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,70 +11,70 @@ |
||
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( |
|
43 | - ['namespace' => 'Backpack\Settings\app\Http\Controllers'], |
|
44 | - function ($router) { |
|
45 | - // Admin Interface Routes |
|
46 | - Route::group( |
|
47 | - [ |
|
48 | - 'prefix' => config('backpack.base.route_prefix', 'admin'), |
|
49 | - 'middleware' => ['web', 'admin'], |
|
50 | - ], |
|
51 | - function () { |
|
52 | - Route::resource('setting', 'SettingCrudController'); |
|
53 | - } |
|
54 | - ); |
|
55 | - } |
|
56 | - ); |
|
57 | - } |
|
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( |
|
43 | + ['namespace' => 'Backpack\Settings\app\Http\Controllers'], |
|
44 | + function ($router) { |
|
45 | + // Admin Interface Routes |
|
46 | + Route::group( |
|
47 | + [ |
|
48 | + 'prefix' => config('backpack.base.route_prefix', 'admin'), |
|
49 | + 'middleware' => ['web', 'admin'], |
|
50 | + ], |
|
51 | + function () { |
|
52 | + Route::resource('setting', 'SettingCrudController'); |
|
53 | + } |
|
54 | + ); |
|
55 | + } |
|
56 | + ); |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * Register any package services. |
|
61 | - * |
|
62 | - * @return void |
|
63 | - */ |
|
64 | - public function register() |
|
65 | - { |
|
66 | - $this->setupRoutes($this->app->router); |
|
67 | - $this->app->singleton('settings', function () { |
|
68 | - $store = []; |
|
69 | - if (count(Schema::getColumnListing('settings'))) { |
|
70 | - // get all settings from the database |
|
71 | - $settings = Setting::all(); |
|
72 | - foreach ($settings as $setting) { |
|
73 | - $store[$setting->key] = $setting->value; |
|
74 | - } |
|
75 | - } |
|
59 | + /** |
|
60 | + * Register any package services. |
|
61 | + * |
|
62 | + * @return void |
|
63 | + */ |
|
64 | + public function register() |
|
65 | + { |
|
66 | + $this->setupRoutes($this->app->router); |
|
67 | + $this->app->singleton('settings', function () { |
|
68 | + $store = []; |
|
69 | + if (count(Schema::getColumnListing('settings'))) { |
|
70 | + // get all settings from the database |
|
71 | + $settings = Setting::all(); |
|
72 | + foreach ($settings as $setting) { |
|
73 | + $store[$setting->key] = $setting->value; |
|
74 | + } |
|
75 | + } |
|
76 | 76 | |
77 | - return new Repository($store); |
|
78 | - }); |
|
79 | - } |
|
77 | + return new Repository($store); |
|
78 | + }); |
|
79 | + } |
|
80 | 80 | } |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | { |
42 | 42 | $router->group( |
43 | 43 | ['namespace' => 'Backpack\Settings\app\Http\Controllers'], |
44 | - function ($router) { |
|
44 | + function($router) { |
|
45 | 45 | // Admin Interface Routes |
46 | 46 | Route::group( |
47 | 47 | [ |
48 | 48 | 'prefix' => config('backpack.base.route_prefix', 'admin'), |
49 | 49 | 'middleware' => ['web', 'admin'], |
50 | 50 | ], |
51 | - function () { |
|
51 | + function() { |
|
52 | 52 | Route::resource('setting', 'SettingCrudController'); |
53 | 53 | } |
54 | 54 | ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function register() |
65 | 65 | { |
66 | 66 | $this->setupRoutes($this->app->router); |
67 | - $this->app->singleton('settings', function () { |
|
67 | + $this->app->singleton('settings', function() { |
|
68 | 68 | $store = []; |
69 | 69 | if (count(Schema::getColumnListing('settings'))) { |
70 | 70 | // get all settings from the database |
@@ -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 | } |