Summary
Version 4 modernizes laravel-dashboard with updated dependencies, proper PHP enums, and improved developer tooling.
Breaking changes
- Livewire 4 required (drops Livewire 3 support)
- Laravel 11+ required (drops Laravel 10 support)
- Tailwind CSS 4 — upgraded from v1, using new
@themedirective and@tailwindcss/browserCDN for the default view Dashboard::getTheme()now returnsThemeenum,Dashboard::getMode()returnsModeenum (instead of strings)Tilemodel uses$fillableinstead of$guarded = [], andcasts()method instead of$castspropertyDashboardTileComponent::$refreshIntervalInSecondsrenamed to$refreshInterval- Fluent methods return
staticinstead ofself - Migration stub uses anonymous class
New features
BaseTileComponent— abstract Livewire component with#[Defer]attribute and a skeleton placeholder, giving tiles lazy-loading out of the boxThemeandModeenums — type-safe theme/mode handling replacing string constantslazyanddeferprops on<x-dashboard-tile>component- PHPStan level 8 with Larastan
Improvements
- Migrated test suite from PHPUnit to Pest
- Expanded test coverage: new tests for
DashboardComponent,UpdateModeComponent, theme query parameters, tile edge cases - CI matrix now includes PHP 8.5
- Removed inline CSS injection from service provider (CSS now loaded via Tailwind browser CDN in view)
- Removed unused
$defaultThemecontextual binding from service provider - Constructor property promotion across components
- Typed return types on all methods
- Removed
yarn.lock/ husky / lint-staged, switched to npm with modern dependency versions
Upgrade guide
See UPGRADE.md for detailed migration instructions.
New Contributors
- @timvandijck made their first contribution in #128
Full Changelog: 3.3.1...4.0.0