This Laravel application demonstrates a simple, barebones Metabase dashboard embedded in a web application using static embedding.
-
Metabase. You should have already completed the setup detailed in the README for this repository, which shows you how to get an instance of Metabase up and running in the metabase directory of this repository.
-
Composer. You'll need Composer to manage PHP packages.
-
Laravel. You'll need to have Laravel installed on your machine.
- Start a new terminal session, change into this directory, and install the application dependencies using the command
composer install
. (The packagelcobucci/jwt
has already been added.)
Note: if you just installed Composer using the default filename for Composer to this directory, you may need to run:
php composer.phar install
- Generate an application key. First, create a .env file by copying the example env file.
cp .env.example .env
Then generate the key.
php artisan key:generate
This command will write the key to your new .env file.
- To start the application, run:
php artisan serve
- Open your browser to localhost:8000 to see the app in action.
Explore the app to learn more about embedding Metabase charts and dashboards in applications. You can also check out the links to more documentation in the parent repository's main README.
-
Code. You can find example code for embedding Metabase in routes/web.php.
-
View. You can find an example view in resources/views/welcome.blade.php.