| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function boot() |
||
| 13 | { |
||
| 14 | if ($this->app->runningInConsole()) { |
||
| 15 | $this->publishes([ |
||
| 16 | __DIR__.'/../config/laravel-api-responses.php' => config_path('laravel-api-responses.php'), |
||
| 17 | ], 'config'); |
||
| 18 | |||
| 19 | if (!file_exists(base_path('_ide_helper_macros.php'))) { |
||
| 20 | // Publishing ide helper file. |
||
| 21 | $this->publishes([ |
||
| 22 | __DIR__.'/../_ide_helper_macros.php.stub' => base_path('_ide_helper_macros.php'), |
||
| 23 | ]); |
||
| 24 | |||
| 25 | // Adding _ide_helper_macros.php file to .gitignore |
||
| 26 | $gitignoreFile = base_path('.gitignore'); |
||
| 27 | file_put_contents($gitignoreFile, file_get_contents($gitignoreFile) . "\n_ide_helper_macros.php"); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 44 |