File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace Eclipse \Catalogue ;
44
5- use Filament \ Contracts \Plugin ;
5+ use Eclipse \ Common \ Foundation \ Plugins \Plugin ;
66use Filament \Panel ;
77
8- class CataloguePlugin implements Plugin
8+ class CataloguePlugin extends Plugin
99{
10- public function getId (): string
11- {
12- return 'eclipse-catalogue ' ;
13- }
14-
1510 public function register (Panel $ panel ): void
1611 {
17- $ panel ->discoverResources (__DIR__ .'/Filament/Resources ' , 'Eclipse \\Catalogue \\Filament \\Resources ' );
18- }
19-
20- public function boot (Panel $ panel ): void
21- {
22- //
23- }
24-
25- public static function make (): static
26- {
27- return app (static ::class);
28- }
29-
30- public static function get (): static
31- {
32- /** @var static $plugin */
33- $ plugin = filament (app (static ::class)->getId ());
34-
35- return $ plugin ;
12+ if ($ panel ->getId () === 'frontend ' ) {
13+ parent ::register ($ panel );
14+ } else {
15+ $ panel ->discoverResources (__DIR__ .'/Filament/Resources ' , 'Eclipse \\Catalogue \\Filament \\Resources ' );
16+ }
3617 }
3718}
You can’t perform that action at this time.
0 commit comments