@@ -5,68 +5,68 @@ |
||
5 | 5 | */ |
6 | 6 | class SettingsObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | 12 | |
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | 17 | |
18 | - /** |
|
19 | - * Prevent the creating of the settings. |
|
20 | - * |
|
21 | - * @param object $model the model beign created. |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - public function creating($model) |
|
25 | - { |
|
26 | - \ErrorHandler::cannotCreateSetting(); |
|
27 | - } |
|
18 | + /** |
|
19 | + * Prevent the creating of the settings. |
|
20 | + * |
|
21 | + * @param object $model the model beign created. |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + public function creating($model) |
|
25 | + { |
|
26 | + \ErrorHandler::cannotCreateSetting(); |
|
27 | + } |
|
28 | 28 | |
29 | - public function created($model) |
|
30 | - { |
|
31 | - // |
|
32 | - } |
|
29 | + public function created($model) |
|
30 | + { |
|
31 | + // |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Prevent updating of the setting key. |
|
36 | - * |
|
37 | - * @param object $model the model beign updated. |
|
38 | - * @return void |
|
39 | - */ |
|
40 | - public function updating($model) |
|
41 | - { |
|
42 | - if ($model->getOriginal('key') !== $model->key) |
|
43 | - { |
|
44 | - \ErrorHandler::cannotUpdateSettingKey(); |
|
45 | - } |
|
46 | - } |
|
34 | + /** |
|
35 | + * Prevent updating of the setting key. |
|
36 | + * |
|
37 | + * @param object $model the model beign updated. |
|
38 | + * @return void |
|
39 | + */ |
|
40 | + public function updating($model) |
|
41 | + { |
|
42 | + if ($model->getOriginal('key') !== $model->key) |
|
43 | + { |
|
44 | + \ErrorHandler::cannotUpdateSettingKey(); |
|
45 | + } |
|
46 | + } |
|
47 | 47 | |
48 | - public function updated($model) |
|
49 | - { |
|
50 | - // |
|
51 | - } |
|
48 | + public function updated($model) |
|
49 | + { |
|
50 | + // |
|
51 | + } |
|
52 | 52 | |
53 | - public function deleting($model) |
|
54 | - { |
|
55 | - // |
|
56 | - } |
|
53 | + public function deleting($model) |
|
54 | + { |
|
55 | + // |
|
56 | + } |
|
57 | 57 | |
58 | - public function deleted($model) |
|
59 | - { |
|
60 | - // |
|
61 | - } |
|
58 | + public function deleted($model) |
|
59 | + { |
|
60 | + // |
|
61 | + } |
|
62 | 62 | |
63 | - public function restoring($model) |
|
64 | - { |
|
65 | - // |
|
66 | - } |
|
63 | + public function restoring($model) |
|
64 | + { |
|
65 | + // |
|
66 | + } |
|
67 | 67 | |
68 | - public function restored($model) |
|
69 | - { |
|
70 | - // |
|
71 | - } |
|
68 | + public function restored($model) |
|
69 | + { |
|
70 | + // |
|
71 | + } |
|
72 | 72 | } |
73 | 73 | \ No newline at end of file |
@@ -14,19 +14,19 @@ |
||
14 | 14 | return 'App\Modules\Core\Settings'; |
15 | 15 | } |
16 | 16 | |
17 | - /** |
|
18 | - * Save list of settings. |
|
19 | - * |
|
20 | - * @param array $data |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function saveMany(array $data) |
|
24 | - { |
|
25 | - \DB::transaction(function () use ($data) { |
|
26 | - foreach ($data as $key => $value) |
|
27 | - { |
|
28 | - $this->save($value); |
|
29 | - } |
|
30 | - }); |
|
31 | - } |
|
17 | + /** |
|
18 | + * Save list of settings. |
|
19 | + * |
|
20 | + * @param array $data |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function saveMany(array $data) |
|
24 | + { |
|
25 | + \DB::transaction(function () use ($data) { |
|
26 | + foreach ($data as $key => $value) |
|
27 | + { |
|
28 | + $this->save($value); |
|
29 | + } |
|
30 | + }); |
|
31 | + } |
|
32 | 32 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function saveMany(array $data) |
24 | 24 | { |
25 | - \DB::transaction(function () use ($data) { |
|
25 | + \DB::transaction(function() use ($data) { |
|
26 | 26 | foreach ($data as $key => $value) |
27 | 27 | { |
28 | 28 | $this->save($value); |
@@ -6,27 +6,27 @@ |
||
6 | 6 | |
7 | 7 | class ApiSkeletonServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | - /** |
|
10 | - * Perform post-registration booting of services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->publishes([ |
|
17 | - __DIR__.'/Modules' => app_path('Modules'), |
|
18 | - __DIR__.'/Modules/Acl/emails' => base_path('resources/views/auth/emails'), |
|
19 | - __DIR__.'/lang' => base_path('resources/lang'), |
|
20 | - ]); |
|
21 | - } |
|
9 | + /** |
|
10 | + * Perform post-registration booting of services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->publishes([ |
|
17 | + __DIR__.'/Modules' => app_path('Modules'), |
|
18 | + __DIR__.'/Modules/Acl/emails' => base_path('resources/views/auth/emails'), |
|
19 | + __DIR__.'/lang' => base_path('resources/lang'), |
|
20 | + ]); |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * Register any package services. |
|
25 | - * |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - public function register() |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
23 | + /** |
|
24 | + * Register any package services. |
|
25 | + * |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + public function register() |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | \ No newline at end of file |