File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 22namespace Observer \LaravelPdd ;
33
44use EasyPdd \Foundation \Application as Pdd ;
5+ use Illuminate \Contracts \Support \DeferrableProvider ;
56use Illuminate \Foundation \Application as LaravelApplication ;
67use Illuminate \Support \ServiceProvider as LaravelServiceProvider ;
78
89
9- class ServiceProvider extends LaravelServiceProvider
10+ class ServiceProvider extends LaravelServiceProvider implements DeferrableProvider
1011{
1112 /**
1213 * Boot the provider.
@@ -15,9 +16,9 @@ public function boot()
1516 {
1617 $ source = realpath (__DIR__ .'/config.php ' );
1718
18- if ( $ this ->app instanceof LaravelApplication && $ this -> app -> runningInConsole ()) {
19- $ this -> publishes ([ $ source => config_path ('pdd.php ' )], ' laravel-pdd ' );
20- }
19+ $ this ->publishes ([
20+ __DIR__ . ' /config.php ' => config_path ('pdd.php ' )
21+ ], ' config ' );
2122
2223 $ this ->mergeConfigFrom ($ source , 'pdd ' );
2324 }
@@ -31,8 +32,10 @@ public function register()
3132 $ app = new Pdd (config ('pdd ' ));
3233 return $ app ;
3334 });
35+ }
3436
35- $ this ->app ->alias (Pdd::class, 'pdd ' );
36- $ this ->app ->alias (Pdd::class, 'easypdd ' );
37+ public function provides ()
38+ {
39+ return ['EasyPdd ' ];
3740 }
38- }
41+ }
You can’t perform that action at this time.
0 commit comments