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 a2b2ab3 commit 70b29f3
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions src/FilamentJsoneditorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,16 @@ class FilamentJsoneditorServiceProvider extends PluginServiceProvider
'invaders-filament-jsoneditor' => __DIR__ . '/../dist/jsoneditor/jsoneditor.min.css',
];

public function boot()
{
$this->bootLoaders();
$this->bootPublishing();
}

protected function bootPublishing()
{
if (! $this->app->runningInConsole()) {
return;
}

$this->publishes([
__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();

$this->publishes([
__DIR__ . '/../dist/jsoneditor/img/jsoneditor-icons.svg' => public_path('filament/assets/img/jsoneditor-icons.svg'),
], 'filament-jsoneditor-img');
}
}

0 comments on commit 70b29f3

Please sign in to comment.