We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Backpack\Settings; |
| 4 | 4 | |
| 5 | 5 | use Backpack\Settings\app\Models\Setting as Setting; |
| 6 | -use Config; |
|
| 7 | 6 | use Illuminate\Routing\Router; |
| 8 | 7 | use Illuminate\Support\Facades\Schema; |
| 9 | 8 | use Illuminate\Support\ServiceProvider; |
@@ -11,67 +11,67 @@ |
||
| 11 | 11 | |
| 12 | 12 | class SettingsServiceProvider extends ServiceProvider |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * Indicates if loading of the provider is deferred. |
|
| 16 | - * |
|
| 17 | - * @var bool |
|
| 18 | - */ |
|
| 19 | - protected $defer = false; |
|
| 14 | + /** |
|
| 15 | + * Indicates if loading of the provider is deferred. |
|
| 16 | + * |
|
| 17 | + * @var bool |
|
| 18 | + */ |
|
| 19 | + protected $defer = false; |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Perform post-registration booting of services. |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function boot() |
|
| 27 | - { |
|
| 28 | - // publish the migrations and seeds |
|
| 29 | - $this->publishes([__DIR__.'/database/migrations/' => database_path('migrations')], 'migrations'); |
|
| 30 | - $this->publishes([__DIR__.'/database/seeds/' => database_path('seeds')], 'seeds'); |
|
| 31 | - } |
|
| 21 | + /** |
|
| 22 | + * Perform post-registration booting of services. |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function boot() |
|
| 27 | + { |
|
| 28 | + // publish the migrations and seeds |
|
| 29 | + $this->publishes([__DIR__.'/database/migrations/' => database_path('migrations')], 'migrations'); |
|
| 30 | + $this->publishes([__DIR__.'/database/seeds/' => database_path('seeds')], 'seeds'); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Define the routes for the application. |
|
| 35 | - * |
|
| 36 | - * @param \Illuminate\Routing\Router $router |
|
| 37 | - * |
|
| 38 | - * @return void |
|
| 39 | - */ |
|
| 40 | - public function setupRoutes(Router $router) |
|
| 41 | - { |
|
| 42 | - $router->group(['namespace' => 'Backpack\Settings\app\Http\Controllers'], function ($router) { |
|
| 43 | - // Admin Interface Routes |
|
| 44 | - Route::group( |
|
| 45 | - [ |
|
| 46 | - 'prefix' => config('backpack.base.route_prefix', 'admin'), |
|
| 47 | - 'middleware' => ['web', 'admin'], |
|
| 48 | - ], |
|
| 49 | - function () { |
|
| 50 | - Route::resource('setting', 'SettingCrudController'); |
|
| 51 | - } |
|
| 52 | - ); |
|
| 53 | - }); |
|
| 54 | - } |
|
| 33 | + /** |
|
| 34 | + * Define the routes for the application. |
|
| 35 | + * |
|
| 36 | + * @param \Illuminate\Routing\Router $router |
|
| 37 | + * |
|
| 38 | + * @return void |
|
| 39 | + */ |
|
| 40 | + public function setupRoutes(Router $router) |
|
| 41 | + { |
|
| 42 | + $router->group(['namespace' => 'Backpack\Settings\app\Http\Controllers'], function ($router) { |
|
| 43 | + // Admin Interface Routes |
|
| 44 | + Route::group( |
|
| 45 | + [ |
|
| 46 | + 'prefix' => config('backpack.base.route_prefix', 'admin'), |
|
| 47 | + 'middleware' => ['web', 'admin'], |
|
| 48 | + ], |
|
| 49 | + function () { |
|
| 50 | + Route::resource('setting', 'SettingCrudController'); |
|
| 51 | + } |
|
| 52 | + ); |
|
| 53 | + }); |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * Register any package services. |
|
| 58 | - * |
|
| 59 | - * @return void |
|
| 60 | - */ |
|
| 61 | - public function register() |
|
| 62 | - { |
|
| 63 | - $this->setupRoutes($this->app->router); |
|
| 64 | - $this->app->singleton('settings', function () { |
|
| 65 | - $store = []; |
|
| 66 | - if (count(Schema::getColumnListing('settings'))) { |
|
| 67 | - // get all settings from the database |
|
| 68 | - $settings = Setting::all(); |
|
| 69 | - foreach ($settings as $setting) { |
|
| 70 | - $store[$setting->key] = $setting->value; |
|
| 71 | - } |
|
| 72 | - } |
|
| 56 | + /** |
|
| 57 | + * Register any package services. |
|
| 58 | + * |
|
| 59 | + * @return void |
|
| 60 | + */ |
|
| 61 | + public function register() |
|
| 62 | + { |
|
| 63 | + $this->setupRoutes($this->app->router); |
|
| 64 | + $this->app->singleton('settings', function () { |
|
| 65 | + $store = []; |
|
| 66 | + if (count(Schema::getColumnListing('settings'))) { |
|
| 67 | + // get all settings from the database |
|
| 68 | + $settings = Setting::all(); |
|
| 69 | + foreach ($settings as $setting) { |
|
| 70 | + $store[$setting->key] = $setting->value; |
|
| 71 | + } |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - return new Repository($store); |
|
| 75 | - }); |
|
| 76 | - } |
|
| 74 | + return new Repository($store); |
|
| 75 | + }); |
|
| 76 | + } |
|
| 77 | 77 | } |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class SettingsFacade |
| 8 | 8 | { |
| 9 | - protected static function getFacadeAccessor() |
|
| 10 | - { |
|
| 11 | - return 'settings'; |
|
| 12 | - } |
|
| 9 | + protected static function getFacadeAccessor() |
|
| 10 | + { |
|
| 11 | + return 'settings'; |
|
| 12 | + } |
|
| 13 | 13 | } |