| Conditions | 3 |
| Paths | 4 |
| Total Lines | 27 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | public function boot() |
||
| 18 | { |
||
| 19 | if ($this->app->runningInConsole()) { |
||
| 20 | $this->commands([ |
||
| 21 | Generator::class, |
||
| 22 | Remover::class, |
||
| 23 | ]); |
||
| 24 | } |
||
| 25 | |||
| 26 | // configs |
||
| 27 | $this->publishes([ |
||
| 28 | __DIR__.'/config/repository.php' => config_path('repository.php'), |
||
| 29 | __DIR__.'/lang/repository.php' => lang_path('en/repository.php'), |
||
| 30 | ], 'repository'); |
||
| 31 | |||
| 32 | // if the configuration is not published then use the package one |
||
| 33 | if (null === $this->app['config']->get('repository')) { |
||
| 34 | $this->app['config']->set('repository', require __DIR__.'/config/repository.php'); |
||
| 35 | } |
||
| 36 | |||
| 37 | // return either the published config or the package one |
||
| 38 | $config = $this->app['config']->get('repository'); |
||
| 39 | |||
| 40 | // stubs |
||
| 41 | $this->publishes([ |
||
| 42 | realpath(__DIR__.'/stubs') => $config['stubs_path'], |
||
| 43 | ], 'repository-stubs'); |
||
| 44 | } |
||
| 57 |