This is the documentation for
v2.
You can switch versions in the menu on the left/at the top.
Check your current version with the following command:
composer show spatie/laravel-dashboard
You can install the package via composer:
composer require spatie/laravel-dashboard
To create the dashboard_tiles
table, you must create and run the migration.
php artisan vendor:publish --provider="Spatie\Dashboard\DashboardServiceProvider" --tag="dashboard-migrations"
php artisan migrate
You must publish the dashboard
config file with this command.
php artisan vendor:publish --provider="Spatie\Dashboard\DashboardServiceProvider" --tag="dashboard-config"
This is the content of the published config file:
return [
/*
* The dashboard supports these themes:
*
* - light: always use light mode
* - dark: always use dark mode
* - device: follow the OS preference for determining light or dark mode
* - auto: use light mode when the sun is up, dark mode when the sun is down
*/
'theme' => 'light',
/*
* When the dashboard uses the `auto` theme, these coordinates will be used
* to determine whether the sun is up or down
*/
'auto_theme_location' => [
'lat' => 51.260197,
'lng' => 4.402771,
],
];