laravel-dashboard icon indicating copy to clipboard operation
laravel-dashboard copied to clipboard

Improve asset management

Open sebastiandedeyne opened this issue 3 years ago • 1 comments

Assets are managed in two ways:

  • By appending (inline) scripts and stylesheets with Dashboard::script(), Dashboard::inlineScript(), Dashboard::stylesheet(), and Dashboard::inlineStylesheet().
  • By @pushing assets to the asset 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).

sebastiandedeyne avatar Apr 09 '21 08:04 sebastiandedeyne

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.

sebastiandedeyne avatar Apr 09 '21 08:04 sebastiandedeyne

We'll take a look when creating the next major version.

freekmurze avatar Feb 02 '23 12:02 freekmurze