@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | $link = $this->link(); |
| 35 | 35 | |
| 36 | - $link = is_array($link)? ModuleView::moduleLink(...$link): $link; |
|
| 36 | + $link = is_array($link) ? ModuleView::moduleLink(...$link) : $link; |
|
| 37 | 37 | |
| 38 | 38 | return (new LaunchButton([ |
| 39 | 39 | 'label' => $this->label(), |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $column = $columns->addColumn(); |
| 65 | 65 | |
| 66 | - if (! function_exists('locale_get_display_language')) { |
|
| 66 | + if (!function_exists('locale_get_display_language')) { |
|
| 67 | 67 | $column->addClass('middle aligned'); |
| 68 | 68 | $column->add(['Label', __('Install php-intl extension to enable language selection!'), 'class' => ['red']]); |
| 69 | 69 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $form->addField('language', ['DropDown', 'values' => $values, 'caption' => __('Select Language')], ['required'=>true])->set($wizard->recall('language', 'en')); |
| 85 | 85 | |
| 86 | - $form->onSubmit(function ($form) use ($wizard) { |
|
| 86 | + $form->onSubmit(function($form) use ($wizard) { |
|
| 87 | 87 | $wizard->memorize('language', $form->model['language']); |
| 88 | 88 | |
| 89 | 89 | App::setLocale($form->model['language']); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $form->addField('support', ['Checkbox', 'caption' => __('I will not remove "Support -> About" credit page from the application menu.')], ['required'=>true]); |
| 110 | 110 | $form->addField('store', ['Checkbox', 'caption' => __('I will not remove or rename "EPESI Store" links from the application.')], ['required'=>true]); |
| 111 | 111 | |
| 112 | - $form->onSubmit(function ($form) use ($wizard) { |
|
| 112 | + $form->onSubmit(function($form) use ($wizard) { |
|
| 113 | 113 | return $wizard->jsNext(); |
| 114 | 114 | }); |
| 115 | 115 | |
@@ -137,12 +137,12 @@ discard block |
||
| 137 | 137 | $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!')])); |
| 138 | 138 | |
| 139 | 139 | foreach ($wizard->recall('connection', []) as $name => $value) { |
| 140 | - if (! $field = $form->fields[$name]?? null) continue; |
|
| 140 | + if (!$field = $form->fields[$name]?? null) continue; |
|
| 141 | 141 | |
| 142 | 142 | $field->set($value); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $form->onSubmit(function ($form) use ($wizard) { |
|
| 145 | + $form->onSubmit(function($form) use ($wizard) { |
|
| 146 | 146 | $connection = $form->model->get(); |
| 147 | 147 | |
| 148 | 148 | $wizard->memorize('connection', $connection); |
@@ -137,7 +137,9 @@ |
||
| 137 | 137 | $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!')])); |
| 138 | 138 | |
| 139 | 139 | foreach ($wizard->recall('connection', []) as $name => $value) { |
| 140 | - if (! $field = $form->fields[$name]?? null) continue; |
|
| 140 | + if (! $field = $form->fields[$name]?? null) { |
|
| 141 | + continue; |
|
| 142 | + } |
|
| 141 | 143 | |
| 142 | 144 | $field->set($value); |
| 143 | 145 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | private static $variables; |
| 18 | 18 | |
| 19 | 19 | private static function cache() { |
| 20 | - if(isset(self::$variables)) return; |
|
| 20 | + if (isset(self::$variables)) return; |
|
| 21 | 21 | |
| 22 | 22 | self::$variables = self::pluck('value', 'name'); |
| 23 | 23 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | public static function get($name, $throwError = true) { |
| 26 | 26 | self::cache(); |
| 27 | 27 | |
| 28 | - if (! self::$variables->has($name) && $throwError) { |
|
| 28 | + if (!self::$variables->has($name) && $throwError) { |
|
| 29 | 29 | throw new \Exception('No such variable in database: ' . $name); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | return self::updateOrCreate(compact('name'), compact('value')); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public static function forget($name, $throwError=true) { |
|
| 49 | + public static function forget($name, $throwError = true) { |
|
| 50 | 50 | self::cache(); |
| 51 | 51 | |
| 52 | - if (! self::$variables->has($name) && $throwError) { |
|
| 52 | + if (!self::$variables->has($name) && $throwError) { |
|
| 53 | 53 | throw new \Exception('No such variable in database: ' . $name); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -17,7 +17,9 @@ |
||
| 17 | 17 | private static $variables; |
| 18 | 18 | |
| 19 | 19 | private static function cache() { |
| 20 | - if(isset(self::$variables)) return; |
|
| 20 | + if(isset(self::$variables)) { |
|
| 21 | + return; |
|
| 22 | + } |
|
| 21 | 23 | |
| 22 | 24 | self::$variables = self::pluck('value', 'name'); |
| 23 | 25 | } |
@@ -6,37 +6,37 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreateCoreTables extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - $this->down(); |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + $this->down(); |
|
| 17 | 17 | |
| 18 | - Schema::create('variables', function (Blueprint $table) { |
|
| 19 | - $table->string('name', 128)->primary(); |
|
| 20 | - $table->text('value'); |
|
| 21 | - }); |
|
| 18 | + Schema::create('variables', function (Blueprint $table) { |
|
| 19 | + $table->string('name', 128)->primary(); |
|
| 20 | + $table->text('value'); |
|
| 21 | + }); |
|
| 22 | 22 | |
| 23 | - Schema::create('modules', function (Blueprint $table) { |
|
| 24 | - $table->string('class', 512); |
|
| 25 | - $table->string('alias', 128)->unique(); |
|
| 26 | - $table->smallInteger('priority'); |
|
| 27 | - $table->smallInteger('state'); |
|
| 28 | - }); |
|
| 29 | - } |
|
| 23 | + Schema::create('modules', function (Blueprint $table) { |
|
| 24 | + $table->string('class', 512); |
|
| 25 | + $table->string('alias', 128)->unique(); |
|
| 26 | + $table->smallInteger('priority'); |
|
| 27 | + $table->smallInteger('state'); |
|
| 28 | + }); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Reverse the migrations. |
|
| 33 | - * |
|
| 34 | - * @return void |
|
| 35 | - */ |
|
| 36 | - public function down() |
|
| 37 | - { |
|
| 38 | - Schema::dropIfExists('variables'); |
|
| 31 | + /** |
|
| 32 | + * Reverse the migrations. |
|
| 33 | + * |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 36 | + public function down() |
|
| 37 | + { |
|
| 38 | + Schema::dropIfExists('variables'); |
|
| 39 | 39 | |
| 40 | - Schema::dropIfExists('modules'); |
|
| 41 | - } |
|
| 40 | + Schema::dropIfExists('modules'); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | { |
| 16 | 16 | $this->down(); |
| 17 | 17 | |
| 18 | - Schema::create('variables', function (Blueprint $table) { |
|
| 18 | + Schema::create('variables', function(Blueprint $table) { |
|
| 19 | 19 | $table->string('name', 128)->primary(); |
| 20 | 20 | $table->text('value'); |
| 21 | 21 | }); |
| 22 | 22 | |
| 23 | - Schema::create('modules', function (Blueprint $table) { |
|
| 23 | + Schema::create('modules', function(Blueprint $table) { |
|
| 24 | 24 | $table->string('class', 512); |
| 25 | 25 | $table->string('alias', 128)->unique(); |
| 26 | 26 | $table->smallInteger('priority'); |
@@ -7,49 +7,49 @@ |
||
| 7 | 7 | |
| 8 | 8 | class ActionButton extends View |
| 9 | 9 | { |
| 10 | - public $defaultTemplate = 'action_button.html'; |
|
| 10 | + public $defaultTemplate = 'action_button.html'; |
|
| 11 | 11 | |
| 12 | - public $ui = 'basic inverted action button'; |
|
| 12 | + public $ui = 'basic inverted action button'; |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Icon that will appear on the button (top). |
|
| 16 | - * |
|
| 17 | - * @var string|array|Icon |
|
| 18 | - */ |
|
| 19 | - public $icon; |
|
| 14 | + /** |
|
| 15 | + * Icon that will appear on the button (top). |
|
| 16 | + * |
|
| 17 | + * @var string|array|Icon |
|
| 18 | + */ |
|
| 19 | + public $icon; |
|
| 20 | 20 | |
| 21 | - public $label; |
|
| 21 | + public $label; |
|
| 22 | 22 | |
| 23 | - public $element = 'a'; |
|
| 23 | + public $element = 'a'; |
|
| 24 | 24 | |
| 25 | - public $weight = 10; |
|
| 25 | + public $weight = 10; |
|
| 26 | 26 | |
| 27 | - public function renderView() |
|
| 28 | - { |
|
| 29 | - $this->addIcon(); |
|
| 27 | + public function renderView() |
|
| 28 | + { |
|
| 29 | + $this->addIcon(); |
|
| 30 | 30 | |
| 31 | - $this->addLabel(); |
|
| 31 | + $this->addLabel(); |
|
| 32 | 32 | |
| 33 | - parent::renderView(); |
|
| 34 | - } |
|
| 33 | + parent::renderView(); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - protected function addIcon() |
|
| 37 | - { |
|
| 38 | - if (! $icon = $this->getIcon()) return; |
|
| 36 | + protected function addIcon() |
|
| 37 | + { |
|
| 38 | + if (! $icon = $this->getIcon()) return; |
|
| 39 | 39 | |
| 40 | - $this->add($icon, 'Icon')->id = null; |
|
| 40 | + $this->add($icon, 'Icon')->id = null; |
|
| 41 | 41 | |
| 42 | - $this->addClass('icon'); |
|
| 43 | - } |
|
| 42 | + $this->addClass('icon'); |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - protected function addLabel() |
|
| 46 | - { |
|
| 47 | - $this->content = $this->label?: $this->content; |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - public function getIcon() |
|
| 51 | - { |
|
| 52 | - return is_object($this->icon)? $this->icon: new Icon($this->icon); |
|
| 53 | - } |
|
| 45 | + protected function addLabel() |
|
| 46 | + { |
|
| 47 | + $this->content = $this->label?: $this->content; |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + public function getIcon() |
|
| 51 | + { |
|
| 52 | + return is_object($this->icon)? $this->icon: new Icon($this->icon); |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | 55 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | protected function addIcon() |
| 37 | 37 | { |
| 38 | - if (! $icon = $this->getIcon()) return; |
|
| 38 | + if (!$icon = $this->getIcon()) return; |
|
| 39 | 39 | |
| 40 | 40 | $this->add($icon, 'Icon')->id = null; |
| 41 | 41 | |
@@ -44,12 +44,12 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | protected function addLabel() |
| 46 | 46 | { |
| 47 | - $this->content = $this->label?: $this->content; |
|
| 47 | + $this->content = $this->label ?: $this->content; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function getIcon() |
| 51 | 51 | { |
| 52 | - return is_object($this->icon)? $this->icon: new Icon($this->icon); |
|
| 52 | + return is_object($this->icon) ? $this->icon : new Icon($this->icon); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | } |
@@ -35,7 +35,9 @@ |
||
| 35 | 35 | |
| 36 | 36 | protected function addIcon() |
| 37 | 37 | { |
| 38 | - if (! $icon = $this->getIcon()) return; |
|
| 38 | + if (! $icon = $this->getIcon()) { |
|
| 39 | + return; |
|
| 40 | + } |
|
| 39 | 41 | |
| 40 | 42 | $this->add($icon, 'Icon')->id = null; |
| 41 | 43 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | protected $validationRules = []; |
| 18 | 18 | |
| 19 | 19 | public function addElements($elements, $parent = null) { |
| 20 | - $parent = $parent?: $this; |
|
| 20 | + $parent = $parent ?: $this; |
|
| 21 | 21 | |
| 22 | 22 | foreach ($elements as $name => $desc) { |
| 23 | 23 | $name = $desc['name']?? $name; |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | switch ($desc['type']?? 'field') { |
| 28 | 28 | case 'field': |
| 29 | - $desc = is_string($desc)? [ |
|
| 29 | + $desc = is_string($desc) ? [ |
|
| 30 | 30 | 'decorator' => [$desc] |
| 31 | - ]: $desc; |
|
| 31 | + ] : $desc; |
|
| 32 | 32 | |
| 33 | 33 | $field = $parent->addField($name, $desc['decorator']?? [], $desc['options']?? []); |
| 34 | 34 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function addFieldsDisplayRules($fieldsDisplayRules) { |
| 80 | - $this->setFieldsDisplayRules(array_merge($this->fieldsDisplayRules?: [], $fieldsDisplayRules)); |
|
| 80 | + $this->setFieldsDisplayRules(array_merge($this->fieldsDisplayRules ?: [], $fieldsDisplayRules)); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | public function addGroupDisplayRules($groupDisplayRules) { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | public function addFieldRules($field, $rules = []) { |
| 92 | - if (! $rules) return; |
|
| 92 | + if (!$rules) return; |
|
| 93 | 93 | |
| 94 | 94 | $this->fieldRules[$field] = $rules['rules']?? [ |
| 95 | 95 | 'identifier' => $field, |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function setValues($values) |
| 103 | 103 | { |
| 104 | - foreach ($values?: [] as $name => $value) { |
|
| 105 | - if (! $field = $this->fields[$name]?? null) continue; |
|
| 104 | + foreach ($values ?: [] as $name => $value) { |
|
| 105 | + if (!$field = $this->fields[$name]?? null) continue; |
|
| 106 | 106 | |
| 107 | 107 | $field->set($value); |
| 108 | 108 | } |
@@ -125,17 +125,17 @@ discard block |
||
| 125 | 125 | 'fields' => $this->fieldRules |
| 126 | 126 | ]); |
| 127 | 127 | |
| 128 | - $this->onSubmit(function ($form) use ($callback) { |
|
| 128 | + $this->onSubmit(function($form) use ($callback) { |
|
| 129 | 129 | $errors = []; |
| 130 | - foreach ($this->validationRules?: [] as $ruleCallback) { |
|
| 131 | - if (! is_callable($ruleCallback)) continue; |
|
| 130 | + foreach ($this->validationRules ?: [] as $ruleCallback) { |
|
| 131 | + if (!is_callable($ruleCallback)) continue; |
|
| 132 | 132 | |
| 133 | 133 | $ruleErrors = $ruleCallback($form); |
| 134 | 134 | |
| 135 | - $errors = array_merge($errors, $ruleErrors?: []); |
|
| 135 | + $errors = array_merge($errors, $ruleErrors ?: []); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return $errors?: $callback($this); |
|
| 138 | + return $errors ?: $callback($this); |
|
| 139 | 139 | }); |
| 140 | 140 | |
| 141 | 141 | return $this; |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | public function confirmLeave($confirm = true) |
| 150 | 150 | { |
| 151 | - $this->canLeave = ! $confirm; |
|
| 151 | + $this->canLeave = !$confirm; |
|
| 152 | 152 | |
| 153 | 153 | return $this; |
| 154 | 154 | } |
@@ -89,7 +89,9 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | public function addFieldRules($field, $rules = []) { |
| 92 | - if (! $rules) return; |
|
| 92 | + if (! $rules) { |
|
| 93 | + return; |
|
| 94 | + } |
|
| 93 | 95 | |
| 94 | 96 | $this->fieldRules[$field] = $rules['rules']?? [ |
| 95 | 97 | 'identifier' => $field, |
@@ -102,7 +104,9 @@ discard block |
||
| 102 | 104 | public function setValues($values) |
| 103 | 105 | { |
| 104 | 106 | foreach ($values?: [] as $name => $value) { |
| 105 | - if (! $field = $this->fields[$name]?? null) continue; |
|
| 107 | + if (! $field = $this->fields[$name]?? null) { |
|
| 108 | + continue; |
|
| 109 | + } |
|
| 106 | 110 | |
| 107 | 111 | $field->set($value); |
| 108 | 112 | } |
@@ -128,7 +132,9 @@ discard block |
||
| 128 | 132 | $this->onSubmit(function ($form) use ($callback) { |
| 129 | 133 | $errors = []; |
| 130 | 134 | foreach ($this->validationRules?: [] as $ruleCallback) { |
| 131 | - if (! is_callable($ruleCallback)) continue; |
|
| 135 | + if (! is_callable($ruleCallback)) { |
|
| 136 | + continue; |
|
| 137 | + } |
|
| 132 | 138 | |
| 133 | 139 | $ruleErrors = $ruleCallback($form); |
| 134 | 140 | |
@@ -4,6 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | class LaunchButton extends ActionButton |
| 6 | 6 | { |
| 7 | - public $ui = 'basic launch pjax button'; |
|
| 7 | + public $ui = 'basic launch pjax button'; |
|
| 8 | 8 | |
| 9 | 9 | } |
@@ -9,22 +9,22 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | class EpesiServiceProvider extends ServiceProvider |
| 11 | 11 | { |
| 12 | - /** |
|
| 13 | - * Booting the package. |
|
| 14 | - */ |
|
| 15 | - public function boot() |
|
| 16 | - { |
|
| 17 | - $this->ensureHttps(); |
|
| 12 | + /** |
|
| 13 | + * Booting the package. |
|
| 14 | + */ |
|
| 15 | + public function boot() |
|
| 16 | + { |
|
| 17 | + $this->ensureHttps(); |
|
| 18 | 18 | |
| 19 | - Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => ['web']], function() { |
|
| 20 | - header("Cache-Control: no-cache, no-store, must-revalidate"); //HTTP 1.1 |
|
| 21 | - header("Pragma: no-cache"); //HTTP 1.0 |
|
| 22 | - header("Expires: 0"); |
|
| 19 | + Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => ['web']], function() { |
|
| 20 | + header("Cache-Control: no-cache, no-store, must-revalidate"); //HTTP 1.1 |
|
| 21 | + header("Pragma: no-cache"); //HTTP 1.0 |
|
| 22 | + header("Expires: 0"); |
|
| 23 | 23 | |
| 24 | - Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view')->middleware('auth'); |
|
| 24 | + Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view')->middleware('auth'); |
|
| 25 | 25 | |
| 26 | - Route::any('install', 'InstallController@index'); |
|
| 27 | - }); |
|
| 26 | + Route::any('install', 'InstallController@index'); |
|
| 27 | + }); |
|
| 28 | 28 | |
| 29 | 29 | // Register providers declared in modules |
| 30 | 30 | foreach (ModuleManager::collect('providers') as $provider) { |
@@ -34,37 +34,37 @@ discard block |
||
| 34 | 34 | $this->loadJsonTranslationsFrom($path); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - // Register admin service provider if in admin mode or in console |
|
| 38 | - // TODO: apply access restriction to admin mode |
|
| 37 | + // Register admin service provider if in admin mode or in console |
|
| 38 | + // TODO: apply access restriction to admin mode |
|
| 39 | 39 | // if ($this->app->runningInConsole() || (request('admin', false) && Auth::user()->can('modify system'))) { |
| 40 | - if ($this->app->runningInConsole() || request('admin', false)) { |
|
| 41 | - $this->app->register(AdminServiceProvider::class); |
|
| 42 | - } |
|
| 43 | - } |
|
| 40 | + if ($this->app->runningInConsole() || request('admin', false)) { |
|
| 41 | + $this->app->register(AdminServiceProvider::class); |
|
| 42 | + } |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Register the provider. |
|
| 47 | - */ |
|
| 48 | - public function register() |
|
| 49 | - { |
|
| 50 | - $this->app->singleton(App::class); |
|
| 51 | - } |
|
| 45 | + /** |
|
| 46 | + * Register the provider. |
|
| 47 | + */ |
|
| 48 | + public function register() |
|
| 49 | + { |
|
| 50 | + $this->app->singleton(App::class); |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Force to set https scheme if https enabled. |
|
| 55 | - * |
|
| 56 | - * @return void |
|
| 57 | - */ |
|
| 58 | - protected function ensureHttps() |
|
| 59 | - { |
|
| 60 | - if (config('epesi.https') || config('epesi.secure')) { |
|
| 61 | - url()->forceScheme('https'); |
|
| 62 | - $this->app['request']->server->set('HTTPS', true); |
|
| 63 | - } |
|
| 64 | - } |
|
| 53 | + /** |
|
| 54 | + * Force to set https scheme if https enabled. |
|
| 55 | + * |
|
| 56 | + * @return void |
|
| 57 | + */ |
|
| 58 | + protected function ensureHttps() |
|
| 59 | + { |
|
| 60 | + if (config('epesi.https') || config('epesi.secure')) { |
|
| 61 | + url()->forceScheme('https'); |
|
| 62 | + $this->app['request']->server->set('HTTPS', true); |
|
| 63 | + } |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | - protected function registerStorageDisk() |
|
| 67 | - { |
|
| 68 | - $this->app['config']['filesystems.disks.epesi'] = config('epesi.disk'); |
|
| 69 | - } |
|
| 66 | + protected function registerStorageDisk() |
|
| 67 | + { |
|
| 68 | + $this->app['config']['filesystems.disks.epesi'] = config('epesi.disk'); |
|
| 69 | + } |
|
| 70 | 70 | } |
@@ -20,23 +20,23 @@ |
||
| 20 | 20 | ModuleInstallCommand::class |
| 21 | 21 | ]; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Booting the package. |
|
| 25 | - */ |
|
| 26 | - public function boot() |
|
| 27 | - { |
|
| 28 | - // Register migrations from installed modules |
|
| 29 | - $this->loadMigrationsFrom(ModuleManager::collect('migrations')); |
|
| 23 | + /** |
|
| 24 | + * Booting the package. |
|
| 25 | + */ |
|
| 26 | + public function boot() |
|
| 27 | + { |
|
| 28 | + // Register migrations from installed modules |
|
| 29 | + $this->loadMigrationsFrom(ModuleManager::collect('migrations')); |
|
| 30 | 30 | |
| 31 | - // Publish epesi configuration files |
|
| 32 | - $this->publishes([__DIR__.'/../../config' => config_path()], 'epesi.config'); |
|
| 33 | - } |
|
| 31 | + // Publish epesi configuration files |
|
| 32 | + $this->publishes([__DIR__.'/../../config' => config_path()], 'epesi.config'); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Register the provider. |
|
| 37 | - */ |
|
| 38 | - public function register() |
|
| 39 | - { |
|
| 40 | - $this->commands($this->commands); |
|
| 41 | - } |
|
| 35 | + /** |
|
| 36 | + * Register the provider. |
|
| 37 | + */ |
|
| 38 | + public function register() |
|
| 39 | + { |
|
| 40 | + $this->commands($this->commands); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $this->loadMigrationsFrom(ModuleManager::collect('migrations')); |
| 30 | 30 | |
| 31 | 31 | // Publish epesi configuration files |
| 32 | - $this->publishes([__DIR__.'/../../config' => config_path()], 'epesi.config'); |
|
| 32 | + $this->publishes([__DIR__ . '/../../config' => config_path()], 'epesi.config'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |