| Conditions | 4 |
| Paths | 8 |
| Total Lines | 29 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 18 | public function boot() |
||
| 19 | { |
||
| 20 | if ($this->app->runningInConsole()) { |
||
| 21 | $this->commands([ |
||
| 22 | Generator::class, |
||
| 23 | Remover::class |
||
| 24 | ]); |
||
| 25 | } |
||
| 26 | |||
| 27 | $this->publishes([ |
||
| 28 | __DIR__.'/config' => realpath('config'), |
||
| 29 | ], 'repository-generator'); |
||
| 30 | |||
| 31 | if (null === $this->app['config']->get('repository')) { |
||
| 32 | $this->app['config']->set('repository', require __DIR__.'/config/repository.php'); |
||
| 33 | } |
||
| 34 | $this->mergeConfigFrom(__DIR__.'/config/repository.php', 'repository-config'); |
||
| 35 | $resourcesPathStub = resource_path('/stubs'); |
||
|
|
|||
| 36 | $stubPath = realpath(__DIR__.'/../stubs'); |
||
| 37 | $langPath = Config::get('repository.lang_path').'/en'; |
||
| 38 | |||
| 39 | if (!is_dir($resourcesPathStub)) { |
||
| 40 | mkdir($resourcesPathStub, 0777, true); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->publishes([ |
||
| 44 | $stubPath => Config::get('repository.stubs_path', $resourcesPathStub), |
||
| 45 | __DIR__.'/lang' => $langPath, |
||
| 46 | ], 'repository-stub'); |
||
| 47 | } |
||
| 56 |