nstechns /
jazzcms-laravel
| 1 | <?php |
||
| 2 | |||
| 3 | namespace NsTechNs\JazzCMS; |
||
| 4 | |||
| 5 | use Illuminate\Support\ServiceProvider; |
||
| 6 | |||
| 7 | class JazzCMSServiceProvider extends ServiceProvider |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Bootstrap the application services. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function boot() |
||
| 15 | { |
||
| 16 | $configPath = __DIR__ . '/../config/jazz-cms.php'; |
||
| 17 | $this->publishes([$configPath => $this->getConfigPath()], 'config'); |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Register the application services. |
||
| 22 | * |
||
| 23 | * @return void |
||
| 24 | */ |
||
| 25 | public function register() |
||
| 26 | { |
||
| 27 | $configPath = __DIR__ . '/../config/jazz-cms.php'; |
||
| 28 | $this->mergeConfigFrom($configPath, 'jazz-cms'); |
||
| 29 | |||
| 30 | $this->app->bind(JazzCMS::class, function ($app) { |
||
|
0 ignored issues
–
show
|
|||
| 31 | return new JazzCMS; |
||
| 32 | }); |
||
| 33 | |||
| 34 | $this->app->alias(JazzCMS::class, 'JazzCMS'); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the config path |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | protected function getConfigPath() |
||
| 43 | { |
||
| 44 | return config_path('jazz-cms.php'); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Publish the config file |
||
| 49 | * |
||
| 50 | * @param string $configPath |
||
| 51 | */ |
||
| 52 | protected function publishConfig($configPath) |
||
| 53 | { |
||
| 54 | $this->publishes([$configPath => config_path('jazz-cms.php')], 'config'); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.