Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class SettingsServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | /** |
||
14 | * Register services. |
||
15 | * |
||
16 | * @return void |
||
17 | */ |
||
18 | 800 | public function register() |
|
19 | { |
||
20 | 800 | if(Schema::hasTable('settings')) |
|
21 | { |
||
22 | 800 | $settings = DB::table('settings')->get(); |
|
23 | 800 | foreach($settings as $setting) |
|
24 | { |
||
25 | 2 | Config([$setting->key => $setting->value]); |
|
26 | } |
||
27 | } |
||
28 | 800 | } |
|
29 | |||
30 | /** |
||
31 | * Bootstrap services. |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | 800 | public function boot() |
|
37 | // |
||
38 | 800 | } |
|
40 |