Total Complexity | 7 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class RepositoryGeneratorServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Bootstrap the application events. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function boot() |
||
15 | { |
||
16 | $this->publishConfig(); |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Register the service provider. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | public function register() |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Publish configuration. |
||
32 | */ |
||
33 | protected function publishConfig() |
||
34 | { |
||
35 | $configPath = __DIR__.'/../config/repository-generator.php'; |
||
36 | |||
37 | if (function_exists('config_path')) { |
||
38 | $publishPath = config_path('repository-generator.php'); |
||
|
|||
39 | } else { |
||
40 | $publishPath = base_path('config/repository-generator.php'); |
||
41 | } |
||
42 | |||
43 | // Publish config files |
||
44 | $this->publishes([$configPath => $publishPath], 'config'); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Merges configs. |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | protected function mergeConfig() |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Register package commands. |
||
59 | */ |
||
60 | protected function registerCommands() |
||
69 |