@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $column = $columns->addColumn(); |
73 | 73 | |
74 | - if (! function_exists('locale_get_display_language')) { |
|
74 | + if (!function_exists('locale_get_display_language')) { |
|
75 | 75 | $column->addClass('middle aligned'); |
76 | 76 | $column->add(['Label', __('Install php-intl extension to enable language selection!'), 'class' => ['red']]); |
77 | 77 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $form->addField('language', ['DropDown', 'values' => $values, 'caption' => __('Select Language'), 'iconLeft' => 'globe'], ['required'=>true])->set($wizard->recall('language', 'en')); |
88 | 88 | |
89 | - $form->onSubmit(function ($form) use ($wizard) { |
|
89 | + $form->onSubmit(function($form) use ($wizard) { |
|
90 | 90 | $wizard->memorize('language', $form->model['language']); |
91 | 91 | |
92 | 92 | App::setLocale($form->model['language']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $form->addField('support', ['Checkbox', 'caption' => __('I will not remove "Support -> About" credit page from the application menu.')], ['required'=>true]); |
119 | 119 | $form->addField('store', ['Checkbox', 'caption' => __('I will not remove or rename ":epesi Store" links from the application.', ['epesi' => config('epesi.app.title')])], ['required'=>true]); |
120 | 120 | |
121 | - $form->onSubmit(function ($form) use ($wizard) { |
|
121 | + $form->onSubmit(function($form) use ($wizard) { |
|
122 | 122 | return $wizard->jsNext(); |
123 | 123 | }); |
124 | 124 | |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | $form->addField('create', ['Checkbox', 'caption' => __('Create New Database')])->on('change', new jsExpression('if ($(event.target).is(":checked")) alert([])', [__('WARNING: Make sure you have CREATE access level to do this!')])); |
147 | 147 | |
148 | 148 | foreach ($wizard->recall('connection', []) as $name => $value) { |
149 | - if (! $field = $form->fields[$name]?? null) continue; |
|
149 | + if (!$field = $form->fields[$name]?? null) continue; |
|
150 | 150 | |
151 | 151 | $field->set($value); |
152 | 152 | } |
153 | 153 | |
154 | - $form->onSubmit(function ($form) use ($wizard) { |
|
154 | + $form->onSubmit(function($form) use ($wizard) { |
|
155 | 155 | $connection = $form->model->get(); |
156 | 156 | |
157 | 157 | $wizard->memorize('connection', $connection); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | 'prompt' => __('Password mismatch') |
204 | 204 | ]]); |
205 | 205 | |
206 | - $form->validate(function ($form) use ($wizard) { |
|
206 | + $form->validate(function($form) use ($wizard) { |
|
207 | 207 | $user = $form->model->get(); |
208 | 208 | |
209 | 209 | User::create([ |
@@ -10,58 +10,58 @@ |
||
10 | 10 | |
11 | 11 | class EpesiServiceProvider extends ServiceProvider |
12 | 12 | { |
13 | - /** |
|
14 | - * Booting the package. |
|
15 | - */ |
|
16 | - public function boot() |
|
17 | - { |
|
18 | - $this->ensureHttps(); |
|
13 | + /** |
|
14 | + * Booting the package. |
|
15 | + */ |
|
16 | + public function boot() |
|
17 | + { |
|
18 | + $this->ensureHttps(); |
|
19 | 19 | |
20 | - Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => 'web'], function() { |
|
21 | - Route::any('/', 'SystemController@index'); |
|
22 | - Route::get('logo', 'SystemController@logo'); |
|
23 | - Route::any('install', 'SystemController@install'); |
|
20 | + Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => 'web'], function() { |
|
21 | + Route::any('/', 'SystemController@index'); |
|
22 | + Route::get('logo', 'SystemController@logo'); |
|
23 | + Route::any('install', 'SystemController@install'); |
|
24 | 24 | |
25 | - Route::group(['middleware' => ['auth', NoCacheHeaders::class]], function() { |
|
26 | - Route::any('home', 'SystemController@home')->name('home'); |
|
25 | + Route::group(['middleware' => ['auth', NoCacheHeaders::class]], function() { |
|
26 | + Route::any('home', 'SystemController@home')->name('home'); |
|
27 | 27 | |
28 | - Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view'); |
|
29 | - }); |
|
30 | - }); |
|
28 | + Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view'); |
|
29 | + }); |
|
30 | + }); |
|
31 | 31 | |
32 | - // call boot methods on all modules |
|
33 | - ModuleManager::call('boot'); |
|
32 | + // call boot methods on all modules |
|
33 | + ModuleManager::call('boot'); |
|
34 | 34 | |
35 | 35 | foreach (ModuleManager::collect('translations') as $path) { |
36 | 36 | $this->loadJsonTranslationsFrom($path); |
37 | 37 | } |
38 | 38 | |
39 | - // Register admin service provider if in admin mode or in console |
|
40 | - // TODO: apply access restriction to admin mode |
|
39 | + // Register admin service provider if in admin mode or in console |
|
40 | + // TODO: apply access restriction to admin mode |
|
41 | 41 | // if ($this->app->runningInConsole() || (request('admin', false) && Auth::user()->can('modify system'))) { |
42 | - if ($this->app->runningInConsole() || request('admin', false)) { |
|
43 | - $this->app->register(AdminServiceProvider::class); |
|
44 | - } |
|
45 | - } |
|
42 | + if ($this->app->runningInConsole() || request('admin', false)) { |
|
43 | + $this->app->register(AdminServiceProvider::class); |
|
44 | + } |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * Register the provider. |
|
49 | - */ |
|
50 | - public function register() |
|
51 | - { |
|
52 | - $this->app->singleton(App::class); |
|
53 | - } |
|
47 | + /** |
|
48 | + * Register the provider. |
|
49 | + */ |
|
50 | + public function register() |
|
51 | + { |
|
52 | + $this->app->singleton(App::class); |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Force to set https scheme if https enabled. |
|
57 | - * |
|
58 | - * @return void |
|
59 | - */ |
|
60 | - protected function ensureHttps() |
|
61 | - { |
|
62 | - if (config('epesi.https') || config('epesi.secure')) { |
|
63 | - url()->forceScheme('https'); |
|
64 | - $this->app['request']->server->set('HTTPS', true); |
|
65 | - } |
|
66 | - } |
|
55 | + /** |
|
56 | + * Force to set https scheme if https enabled. |
|
57 | + * |
|
58 | + * @return void |
|
59 | + */ |
|
60 | + protected function ensureHttps() |
|
61 | + { |
|
62 | + if (config('epesi.https') || config('epesi.secure')) { |
|
63 | + url()->forceScheme('https'); |
|
64 | + $this->app['request']->server->set('HTTPS', true); |
|
65 | + } |
|
66 | + } |
|
67 | 67 | } |