Skip to content

Commit

Permalink
Update ServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
invaders-xx authored Mar 5, 2023
1 parent b8d0c91 commit a2b2ab3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/FilamentJsoneditorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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();
}
}

0 comments on commit a2b2ab3

Please sign in to comment.