File tree Expand file tree Collapse file tree 4 files changed +70
-1
lines changed Expand file tree Collapse file tree 4 files changed +70
-1
lines changed Original file line number Diff line number Diff line change 2222 "pestphp/pest-plugin" : true
2323 }
2424 },
25- "minimum-stability" : " stable" ,
25+ "minimum-stability" : " dev" ,
26+ "prefer-stable" : true ,
2627 "autoload" : {
2728 "psr-4" : {
2829 "Eclipse\\ PluginTemplate\\ " : " src/" ,
4849 "pestphp/pest-plugin-livewire" : " ^3.0"
4950 },
5051 "scripts" : {
52+ "post-autoload-dump" : " @php ./vendor/bin/testbench package:discover --ansi" ,
5153 "format" : " vendor/bin/pint" ,
5254 "test" : " vendor/bin/testbench package:test"
55+ },
56+ "extra" : {
57+ "laravel" : {
58+ "providers" : [
59+ " Eclipse\\ PluginTemplate\\ PluginTemplateServiceProvider"
60+ ]
61+ }
5362 }
5463}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Eclipse \PluginTemplate ;
4+
5+ use Filament \Contracts \Plugin ;
6+ use Filament \Panel ;
7+
8+ class PluginTemplate implements Plugin
9+ {
10+ public function getId (): string
11+ {
12+ return 'plugin-template ' ;
13+ }
14+
15+ public function register (Panel $ panel ): void
16+ {
17+ //
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 ;
36+ }
37+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Eclipse \PluginTemplate ;
4+
5+ use Spatie \LaravelPackageTools \Package ;
6+ use Spatie \LaravelPackageTools \PackageServiceProvider ;
7+
8+ class PluginTemplateServiceProvider extends PackageServiceProvider
9+ {
10+ public static string $ name = 'plugin-template ' ;
11+
12+ public function configurePackage (Package $ package ): void
13+ {
14+ $ package ->name (static ::$ name )
15+ ->hasConfigFile ()
16+ ->hasTranslations ();
17+ }
18+ }
Original file line number Diff line number Diff line change 1+ workbench :
2+ # Do not run database migrations from the default skeleton
3+ install : false
4+ providers :
5+ - Eclipse\PluginTemplate\PluginTemplateServiceProvider
You can’t perform that action at this time.
0 commit comments