| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ServiceProvider extends BaseServiceProvider implements DeferrableProvider |
||
| 9 | { |
||
| 10 | protected $defer = true; |
||
| 11 | |||
| 12 | const CONFIG_PATH = __DIR__.'/../config/laravel-yourls-plugin.php'; |
||
| 13 | |||
| 14 | public function boot() |
||
| 15 | { |
||
| 16 | $this->publishes([ |
||
| 17 | self::CONFIG_PATH => config_path('laravel-yourls-plugin.php'), |
||
| 18 | ], 'config'); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function register() |
||
| 22 | { |
||
| 23 | $this->mergeConfigFrom( |
||
| 24 | self::CONFIG_PATH, |
||
| 25 | 'laravel-yourls-plugin' |
||
| 26 | ); |
||
| 27 | |||
| 28 | $this->app->singleton(LaravelYourlsPlugin::class, function ($app) { |
||
| 29 | return new LaravelYourlsPlugin($app['config']['laravel-yourls-plugin']); |
||
| 30 | }); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function provides() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |