@@ -21,7 +21,7 @@ |
||
| 21 | 21 | CbRouter::routeController($module->path, $module->controller); |
| 22 | 22 | } |
| 23 | 23 | } catch (Exception $e) { |
| 24 | - dd($e); |
|
| 24 | + dd($e); |
|
| 25 | 25 | } |
| 26 | 26 | }); |
| 27 | 27 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | $namespace = cbControllersNS(); |
| 6 | 6 | /* ROUTER FOR UPLOADS */ |
| 7 | -Route::group(['middleware' => ['web'], 'namespace' => $namespace], function () { |
|
| 7 | +Route::group(['middleware' => ['web'], 'namespace' => $namespace], function() { |
|
| 8 | 8 | Route::get('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', ['uses' => 'FileController@getPreview', 'as' => 'fileControllerPreview']); |
| 9 | 9 | }); |
| 10 | 10 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | 'middleware' => ['web', \crocodicstudio\crudbooster\CBCoreModule\middlewares\CBBackend::class], |
| 14 | 14 | 'prefix' => cbAdminPath(), |
| 15 | 15 | 'namespace' => ctrlNamespace(), |
| 16 | -], function () { |
|
| 16 | +], function() { |
|
| 17 | 17 | try { |
| 18 | 18 | $argv = request()->server('argv'); |
| 19 | 19 | if (is_array($argv) && isset($argv[1]) && !starts_with($argv[1], 'route:')) { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'middleware' => ['web', \crocodicstudio\crudbooster\CBCoreModule\middlewares\CBSuperadmin::class], |
| 34 | 34 | 'prefix' => cbAdminPath(), |
| 35 | 35 | 'namespace' => $namespace, |
| 36 | -], function () { |
|
| 36 | +], function() { |
|
| 37 | 37 | Route::post('{module}/do-upload-import-data', 'FileController@uploadImportData')->name('UploadImportData'); |
| 38 | 38 | Route::post('{module}/upload-summernote', 'FileController@uploadSummernote')->name('UploadImportData'); |
| 39 | 39 | Route::post('{module}/upload-file', 'FileController@uploadFile')->name('UploadImportData'); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | ApiResponder::send($result, $posts, $this->ctrl); |
| 62 | 62 | } elseif (in_array($actionType, ['save_add', 'save_edit'])) { |
| 63 | - $rowAssign = array_filter($input_validator, function ($column) use ($table) { |
|
| 63 | + $rowAssign = array_filter($input_validator, function($column) use ($table) { |
|
| 64 | 64 | return Schema::hasColumn($table, $column); |
| 65 | 65 | }, ARRAY_FILTER_USE_KEY); |
| 66 | 66 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | private function filterRows($data, $parameters, $posts, $table, $typeExcept) |
| 115 | 115 | { |
| 116 | - $data->where(function ($w) use ($parameters, $posts, $table, $typeExcept) { |
|
| 116 | + $data->where(function($w) use ($parameters, $posts, $table, $typeExcept) { |
|
| 117 | 117 | foreach ($parameters as $param) { |
| 118 | 118 | $name = $param['name']; |
| 119 | 119 | $type = $param['type']; |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | private function applyLike($data, $search_in, $value) |
| 253 | 253 | { |
| 254 | - $data->where(function ($w) use ($search_in, $value) { |
|
| 254 | + $data->where(function($w) use ($search_in, $value) { |
|
| 255 | 255 | foreach ($search_in as $k => $field) { |
| 256 | 256 | $method = 'orWhere'; |
| 257 | 257 | if ($k == 0) { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | private function joinRelatedTables($table, $responsesFields, $name, $data, $nameTmp) |
| 274 | 274 | { |
| 275 | - if (! DbInspector::isForeignKey($name)) { |
|
| 275 | + if (!DbInspector::isForeignKey($name)) { |
|
| 276 | 276 | return $nameTmp; |
| 277 | 277 | } |
| 278 | 278 | $joinTable = DbInspector::getRelatedTableName($name); |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | private function doValidation($inputValidator, $dataValidation, $posts) |
| 298 | 298 | { |
| 299 | 299 | $validator = Validator::make($inputValidator, $dataValidation); |
| 300 | - if (! $validator->fails()) { |
|
| 300 | + if (!$validator->fails()) { |
|
| 301 | 301 | return true; |
| 302 | 302 | } |
| 303 | 303 | $message = $validator->errors()->all(); |
@@ -313,11 +313,11 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | private function filterRedundantResp($responses) |
| 315 | 315 | { |
| 316 | - $responses = array_filter($responses, function ($resp) { |
|
| 317 | - return ! ($resp['name'] == 'ref_id' || $resp['type'] == 'custom'); |
|
| 316 | + $responses = array_filter($responses, function($resp) { |
|
| 317 | + return !($resp['name'] == 'ref_id' || $resp['type'] == 'custom'); |
|
| 318 | 318 | }); |
| 319 | 319 | |
| 320 | - $responses = array_filter($responses, function ($resp) { |
|
| 320 | + $responses = array_filter($responses, function($resp) { |
|
| 321 | 321 | return (intval($resp['used']) != 0 || DbInspector::isForeignKey($resp['name'])); |
| 322 | 322 | }); |
| 323 | 323 | |
@@ -332,15 +332,15 @@ discard block |
||
| 332 | 332 | private function validateParams($parameters, $table) |
| 333 | 333 | { |
| 334 | 334 | $posts = request()->all(); |
| 335 | - if (! $parameters) { |
|
| 335 | + if (!$parameters) { |
|
| 336 | 336 | return ['', '']; |
| 337 | 337 | } |
| 338 | 338 | $typeExcept = ['password', 'ref', 'base64_file', 'custom', 'search']; |
| 339 | 339 | $inputValidator = []; |
| 340 | 340 | $dataValidation = []; |
| 341 | 341 | |
| 342 | - $parameters = array_filter($parameters, function ($param){ |
|
| 343 | - return !(is_string($param['config'])&& !starts_with($param['config'], '*')); |
|
| 342 | + $parameters = array_filter($parameters, function($param) { |
|
| 343 | + return !(is_string($param['config']) && !starts_with($param['config'], '*')); |
|
| 344 | 344 | }); |
| 345 | 345 | |
| 346 | 346 | foreach ($parameters as $param) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | //LISTING INDEX HTML |
| 77 | 77 | $addAction = $CbCtrl->data['addAction']; |
| 78 | 78 | |
| 79 | - if (! empty($CbCtrl->sub_module)) { |
|
| 79 | + if (!empty($CbCtrl->sub_module)) { |
|
| 80 | 80 | $addAction = $this->_handleSubModules($addAction); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | //$orig_mainpath = $CbCtrl->data['mainpath']; |
| 85 | 85 | //$titleField = $CbCtrl->titleField; |
| 86 | 86 | $number = (request('page', 1) - 1) * $limit + 1; |
| 87 | - $columnsTable = array_filter($columns_table, function ($col) { |
|
| 87 | + $columnsTable = array_filter($columns_table, function($col) { |
|
| 88 | 88 | return $col['visible'] !== false; |
| 89 | 89 | }); |
| 90 | 90 | $htmlContents = (new RowContent($CbCtrl))->calculate($data, $number, $columnsTable, $addAction); //end foreach data[result] |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $data['parent_field'] = DbInspector::getRelatedTableName($parent); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if (! $data['parent_field']) { |
|
| 111 | + if (!$data['parent_field']) { |
|
| 112 | 112 | return $data; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | private function _filterForParent($result) |
| 129 | 129 | { |
| 130 | - if (! request('parent_id')) { |
|
| 130 | + if (!request('parent_id')) { |
|
| 131 | 131 | return null; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -198,9 +198,9 @@ discard block |
||
| 198 | 198 | private function _applyWhereAndQfilters($result, $columnsTable, $table) |
| 199 | 199 | { |
| 200 | 200 | if (request('q')) { |
| 201 | - $result->where(function ($query) use ($columnsTable) { |
|
| 201 | + $result->where(function($query) use ($columnsTable) { |
|
| 202 | 202 | foreach ($columnsTable as $col) { |
| 203 | - if (! $col['field_with']) { |
|
| 203 | + if (!$col['field_with']) { |
|
| 204 | 204 | continue; |
| 205 | 205 | } |
| 206 | 206 | $query->orwhere($col['field_with'], "like", "%".request("q")."%"); |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns=' |
| 245 | 245 | .$module['parent_columns'].'&parent_columns_alias=' |
| 246 | 246 | .$module['parent_columns_alias'].'&parent_id=[' |
| 247 | - .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
| 247 | + .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
| 248 | 248 | .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key=' |
| 249 | 249 | .$module['foreign_key'].'&label='.urlencode($module['label']); |
| 250 | 250 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | public function myPhoto() : string |
| 41 | 41 | { |
| 42 | - $photo = $this->photo ?: 'vendor/crudbooster/avatar.jpg'; |
|
| 42 | + $photo = $this->photo ?: 'vendor/crudbooster/avatar.jpg'; |
|
| 43 | 43 | return asset($photo); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | $user = $this->usersRepo->findByMail(request("email")); |
| 32 | 32 | |
| 33 | - if (! auth('cbAdmin')->attempt($credentials)) { |
|
| 33 | + if (!auth('cbAdmin')->attempt($credentials)) { |
|
| 34 | 34 | $resp = redirect()->route('getLogin')->with('message', cbTrans('alert_password_wrong')); |
| 35 | 35 | sendAndTerminate($resp); |
| 36 | 36 | } |
@@ -5,36 +5,36 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateCmsStatisticComponentsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('cms_statistic_components', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->integer('id_cms_statistics')->nullable(); |
|
| 19 | - $table->string('componentID')->nullable(); |
|
| 20 | - $table->string('component_name')->nullable(); |
|
| 21 | - $table->string('area_name', 55)->nullable(); |
|
| 22 | - $table->integer('sorting')->nullable(); |
|
| 23 | - $table->string('name')->nullable(); |
|
| 24 | - $table->text('config')->nullable(); |
|
| 25 | - $table->timestamps(); |
|
| 26 | - }); |
|
| 27 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('cms_statistic_components', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->integer('id_cms_statistics')->nullable(); |
|
| 19 | + $table->string('componentID')->nullable(); |
|
| 20 | + $table->string('component_name')->nullable(); |
|
| 21 | + $table->string('area_name', 55)->nullable(); |
|
| 22 | + $table->integer('sorting')->nullable(); |
|
| 23 | + $table->string('name')->nullable(); |
|
| 24 | + $table->text('config')->nullable(); |
|
| 25 | + $table->timestamps(); |
|
| 26 | + }); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Reverse the migrations. |
|
| 32 | - * |
|
| 33 | - * @return void |
|
| 34 | - */ |
|
| 35 | - public function down() |
|
| 36 | - { |
|
| 37 | - Schema::drop('cms_statistic_components'); |
|
| 38 | - } |
|
| 30 | + /** |
|
| 31 | + * Reverse the migrations. |
|
| 32 | + * |
|
| 33 | + * @return void |
|
| 34 | + */ |
|
| 35 | + public function down() |
|
| 36 | + { |
|
| 37 | + Schema::drop('cms_statistic_components'); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | } |
@@ -5,31 +5,31 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateCmsStatisticsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('cms_statistics', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->string('name')->nullable(); |
|
| 19 | - $table->string('slug')->nullable(); |
|
| 20 | - $table->timestamps(); |
|
| 21 | - }); |
|
| 22 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('cms_statistics', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->string('name')->nullable(); |
|
| 19 | + $table->string('slug')->nullable(); |
|
| 20 | + $table->timestamps(); |
|
| 21 | + }); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Reverse the migrations. |
|
| 27 | - * |
|
| 28 | - * @return void |
|
| 29 | - */ |
|
| 30 | - public function down() |
|
| 31 | - { |
|
| 32 | - Schema::drop('cms_statistics'); |
|
| 33 | - } |
|
| 25 | + /** |
|
| 26 | + * Reverse the migrations. |
|
| 27 | + * |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 30 | + public function down() |
|
| 31 | + { |
|
| 32 | + Schema::drop('cms_statistics'); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | 35 | } |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | 17 | $this->app['view']->addNamespace('CbStatistics', __DIR__.'/views'); |
| 18 | - $this->loadRoutesFrom( __DIR__.'/statistic_route.php'); |
|
| 19 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 18 | + $this->loadRoutesFrom(__DIR__.'/statistic_route.php'); |
|
| 19 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -5,36 +5,36 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateCmsSettingsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('cms_settings', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->string('name', 50)->nullable(); |
|
| 19 | - $table->text('content', 65535)->nullable(); |
|
| 20 | - $table->string('content_input_type')->nullable(); |
|
| 21 | - $table->string('dataenum')->nullable(); |
|
| 22 | - $table->string('helper')->nullable(); |
|
| 23 | - $table->timestamps(); |
|
| 24 | - $table->string('group_setting', 50)->nullable(); |
|
| 25 | - $table->string('label', 50)->nullable(); |
|
| 26 | - }); |
|
| 27 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('cms_settings', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->string('name', 50)->nullable(); |
|
| 19 | + $table->text('content', 65535)->nullable(); |
|
| 20 | + $table->string('content_input_type')->nullable(); |
|
| 21 | + $table->string('dataenum')->nullable(); |
|
| 22 | + $table->string('helper')->nullable(); |
|
| 23 | + $table->timestamps(); |
|
| 24 | + $table->string('group_setting', 50)->nullable(); |
|
| 25 | + $table->string('label', 50)->nullable(); |
|
| 26 | + }); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Reverse the migrations. |
|
| 32 | - * |
|
| 33 | - * @return void |
|
| 34 | - */ |
|
| 35 | - public function down() |
|
| 36 | - { |
|
| 37 | - Schema::drop('cms_settings'); |
|
| 38 | - } |
|
| 30 | + /** |
|
| 31 | + * Reverse the migrations. |
|
| 32 | + * |
|
| 33 | + * @return void |
|
| 34 | + */ |
|
| 35 | + public function down() |
|
| 36 | + { |
|
| 37 | + Schema::drop('cms_settings'); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | } |