mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
feature: add plugin service provider hooks for register
This commit is contained in:
@@ -20,6 +20,8 @@ abstract class PluginServiceProvider extends ServiceProvider
|
||||
|
||||
public function register()
|
||||
{
|
||||
$this->registeringPlugin();
|
||||
|
||||
$this->app->booting(function () {
|
||||
foreach ($this->pages() as $page) {
|
||||
Filament::registerPage($page);
|
||||
@@ -49,6 +51,8 @@ abstract class PluginServiceProvider extends ServiceProvider
|
||||
Filament::provideToScript($this->scriptData());
|
||||
});
|
||||
});
|
||||
|
||||
$this->pluginRegistered();
|
||||
}
|
||||
|
||||
protected function pages()
|
||||
@@ -56,6 +60,16 @@ abstract class PluginServiceProvider extends ServiceProvider
|
||||
return $this->pages;
|
||||
}
|
||||
|
||||
protected function pluginRegistered()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
protected function registeringPlugin()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
protected function resources()
|
||||
{
|
||||
return $this->resources;
|
||||
|
||||
Reference in New Issue
Block a user