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:
'theme' => 'light',
'auto_theme_location' => [
'lat' => 51.260197,
'lng' => 4.402771,
In order for the dashboard to run constantly without anybody having to refresh it every once in a while, you need to add an exception for Livewire routes in your
VerifyCsrfToken middleware (/app/Http/Middleware/VerifyCsrfToken.php):
protected $except = [
Livewire uses AJAX requests to update the components. Those AJAX requests contain a CSRF token, and at some point that token will expire and you will see a
419 Page Expired error in your dashboard. This will prevent it from happening.