From a2b2ab3505a7a80c24fc931d66a11a496b4b8b63 Mon Sep 17 00:00:00 2001 From: David Vincent Date: Sun, 5 Mar 2023 10:22:11 +0100 Subject: [PATCH] Update ServiceProvider --- src/FilamentJsoneditorServiceProvider.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/FilamentJsoneditorServiceProvider.php b/src/FilamentJsoneditorServiceProvider.php index 8e3a0b4..3bcb2c8 100644 --- a/src/FilamentJsoneditorServiceProvider.php +++ b/src/FilamentJsoneditorServiceProvider.php @@ -22,7 +22,13 @@ class FilamentJsoneditorServiceProvider extends PluginServiceProvider protected array $styles = [ 'invaders-filament-jsoneditor' => __DIR__ . '/../dist/jsoneditor/jsoneditor.min.css', ]; - + + public function boot() + { + $this->bootLoaders(); + $this->bootPublishing(); + } + protected function bootPublishing() { if (! $this->app->runningInConsole()) { @@ -33,13 +39,17 @@ protected function bootPublishing() __DIR__ . '/../dist/jsoneditor/img/jsoneditor-icons.svg' => public_path('filament/assets/img/jsoneditor-icons.svg'), ], 'filament-jsoneditor-img'); } - + + protected function bootLoaders() + { + $this->loadViewsFrom(__DIR__ . '/../resources/views', 'filament-jsoneditor'); + } + public function configurePackage(Package $package): void { $package ->name(self::$name) ->hasConfigFile() - ->hasAssets() ->hasViews(); } }