diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index db7474d..ee18a2e 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -58,13 +58,20 @@ public function boot() } $this->loadRoutesFrom(__DIR__.'/routes/boilerplate-media-manager.php'); - $this->loadViewsFrom(__DIR__.'/resources/views', 'boilerplate-media-manager'); $this->loadViewsFrom(__DIR__.'/resources/views/components', 'boilerplate-media-manager'); + $this->loadViewsFrom(__DIR__.'/resources/views', 'boilerplate-media-manager'); $this->loadTranslationsFrom(__DIR__.'/resources/lang', 'boilerplate-media-manager'); $this->loadMigrationsFrom(__DIR__.'/migrations'); - View::composer('boilerplate-media-manager::components.image', ImageComposer::class); - View::composer('boilerplate-media-manager::components.file', FileComposer::class); + View::composer([ + 'boilerplate-media-manager::image', + 'boilerplate-media-manager::components.image', + ], ImageComposer::class); + + View::composer([ + 'boilerplate-media-manager::file', + 'boilerplate-media-manager::components.file', + ], FileComposer::class); Blade::directive('img', function ($options) { return "= img($options) ?>"; diff --git a/src/resources/views/components/scripts.blade.php b/src/resources/views/components/async_scripts.blade.php similarity index 100% rename from src/resources/views/components/scripts.blade.php rename to src/resources/views/components/async_scripts.blade.php diff --git a/src/resources/views/components/file.blade.php b/src/resources/views/components/file.blade.php index 1bc80c0..f1a4242 100644 --- a/src/resources/views/components/file.blade.php +++ b/src/resources/views/components/file.blade.php @@ -19,5 +19,5 @@