| 1 | <?php |
||
| 9 | class ServiceProvider extends Provider |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Bootstrap the application services. |
||
| 13 | * |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | public function boot() |
||
| 17 | { |
||
| 18 | $this->publishAssets(); |
||
| 19 | $this->registerMacro(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Publish package assets. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | protected function publishAssets() |
||
| 28 | { |
||
| 29 | $this->publishes([ |
||
| 30 | realpath(__DIR__.'/../config/i18n.php') => config_path('i18n.php'), |
||
| 31 | ], 'config'); |
||
| 32 | |||
| 33 | $this->publishes([ |
||
| 34 | realpath(__DIR__.'/../database/migrations/') => database_path('migrations'), |
||
| 35 | ], 'migrations'); |
||
| 36 | |||
| 37 | $this->publishes([ |
||
| 38 | realpath(__DIR__.'/../storage/i18n/') => storage_path('i18n'), |
||
| 39 | ], 'languages.json'); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Register the application services. |
||
| 44 | * |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function register() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Register macro for Collection class. |
||
| 58 | * |
||
| 59 | * @return void |
||
| 60 | */ |
||
| 61 | protected function registerMacro() |
||
| 73 | } |
||
| 74 |