Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class RotateServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Bootstrap the application services. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | public function boot() |
||
16 | { |
||
17 | $this->publishes([ |
||
18 | __DIR__.'/../config/rotate.php' => config_path('rotate.php'), |
||
19 | ], 'config'); |
||
20 | |||
21 | if ($this->app->runningInConsole()) { |
||
22 | $this->commands([ |
||
23 | Commands\Rotate::class, |
||
24 | Commands\RotateFile::class, |
||
25 | ]); |
||
26 | |||
27 | $this->registerSchedule(); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Register the application services. |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function register() |
||
37 | { |
||
38 | $this->mergeConfigFrom(__DIR__.'/../config/rotate.php', 'rotate'); |
||
39 | } |
||
40 | |||
41 | private function registerSchedule() |
||
52 | }); |
||
53 | } |
||
54 | } |
||
55 |