![image](https://private-user-images.githubusercontent.com/604907/330077556-cadb4346-d3fe-4749-ba6e-0e4eed2c9576.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMDY2OTIsIm5iZiI6MTcyMTIwNjM5MiwicGF0aCI6Ii82MDQ5MDcvMzMwMDc3NTU2LWNhZGI0MzQ2LWQzZmUtNDc0OS1iYTZlLTBlNGVlZDJjOTU3Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QwODUzMTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wODRiZDlmYzBhMzhiNjIxY2EzNDgwODliMWEyYzMwZTQxYWIyNzdhMTFmOTM4NTkzMjYxYjJjODNhMmMxOTFmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.yPkZf46araS4Ia-DZ4jggVExB3nSXeXY7PWMx9Ikiys)
![image](https://private-user-images.githubusercontent.com/604907/330077684-f41809b0-3ef0-4dd9-a894-ff199050ca2d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMDY2OTIsIm5iZiI6MTcyMTIwNjM5MiwicGF0aCI6Ii82MDQ5MDcvMzMwMDc3Njg0LWY0MTgwOWIwLTNlZjAtNGRkOS1hODk0LWZmMTk5MDUwY2EyZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QwODUzMTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZjRkMjY3NjM2ZDlkNzVkNzY2OWM5ZDZiNDgzZGFlNDgwNWYxMDg4MDc1NDBhMjZlODY0YzIxMGFlZGMzNTMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.WTGZ_echL-UIpatNdX9cRL7UbmgXWj9GVBuKpTTOcCQ)
This package allows to add widgets and define the layout of the dashboard page on a per-user basic. This package uses Laravel model settings package to ensure persistence of data in the database.
You can install the package via composer:
composer require invaders-xx/filament-gridstack-dashboard
php artisan filament:assets
Note: Add plugin Blade files to your custom theme
tailwind.config.js
for dark mode.To set up your own custom theme, you can visit the official instruction page on the Filament website.
Add the plugin's views to your tailwind.config.js
file.
content: [
'<path-to-vendor>/invaders-xx/filament-gridstack-dashboard/resources/**/*.blade.php',
]
Please visit Laravel model settings to configure your User model to use this package.
You can publish the config file with:
php artisan vendor:publish --tag="filament-gridstack-dashboard-config"
This is the contents of the published config file:
return [
];
There is no option at the moment.
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-gridstack-dashboard-views"
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
])
}
you can configure the settings path (string in dotted format where to store in the settings) By default the path is 'dashboard.layout'
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()->settingsPath('dashboard.settings'),
])
}
Set the allowed_widgets config. Set this value to null if you want to show all widgets of the panel.
return [
'allowed_widgets' => [
RunningProjectsChart::class,
BrutoMarginChart::class,
ApprovedQuotes::class,
FollowUpTableWidget::class,
PaymentRemindersTableWidget::class
]
];
Set the empty_state_widgets` config.
return [
'empty_state_widgets' =>
[
[
"widget" => RunningProjectsChart::class,
"x" => 0,
"y" => 0,
"w" => 6,
],
[
"widget" => BrutoMarginChart::class,
"x" => 6,
"y" => 0,
"w" => 6,
],
[
"widget" => ApprovedQuotes::class,
"x" => 0,
"y" => 1,
"w" => 12,
],
[
"widget" => FollowUpTableWidget::class,
"x" => 0,
"y" => 2,
"w" => 12,
],
[
"widget" => PaymentRemindersTableWidget::class,
"x" => 0,
"y" => 3,
"w" => 12,
]
]
];
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.