laravel-dashboard
laravel-dashboard copied to clipboard
Improve asset management
Assets are managed in two ways:
- By appending (inline) scripts and stylesheets with
Dashboard::script()
,Dashboard::inlineScript()
,Dashboard::stylesheet()
, andDashboard::inlineStylesheet()
. - By
@push
ing assets to theasset
stack in Blade
It's not a not a major issue but makes it more difficult to find out where an asset came from in the rendered dashboard.blade.php
view.
More importantly, there's also no way to override assets that are registered by default. There should be a way to replace the main stylesheet instead of appending more styles (see https://github.com/spatie/laravel-dashboard/discussions/71).
Ideally there's one way to manage the dashboard's assets, with support to modify them (at least the default ones).
This will probably be a breaking change, so we might hold off onto actually merging/releasing this until we're ready to work on a next major version.
We'll take a look when creating the next major version.