@@ -14,8 +14,8 @@ |
||
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | 16 | $this->app['view']->addNamespace('CbMenu', __DIR__.'/views'); |
| 17 | - $this->loadRoutesFrom( __DIR__.'/menus_routes.php'); |
|
| 18 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 17 | + $this->loadRoutesFrom(__DIR__.'/menus_routes.php'); |
|
| 18 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
| 19 | 19 | app('CbDynamicMenus')->addSuperAdminMenu('CbMenu::menu'); |
| 20 | 20 | app('CbDynamicMenus')->addMenu('CbMenu::dynamic_menus'); |
| 21 | 21 | $this->registerModule(); |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | - $this->loadViewsFrom( __DIR__.'/views', 'CbNotifications'); |
|
| 17 | - $this->loadRoutesFrom( __DIR__.'/notifications_routes.php'); |
|
| 18 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 16 | + $this->loadViewsFrom(__DIR__.'/views', 'CbNotifications'); |
|
| 17 | + $this->loadRoutesFrom(__DIR__.'/notifications_routes.php'); |
|
| 18 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
| 19 | 19 | $this->registerModule(); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | 16 | $this->app['view']->addNamespace('CbStatistics', __DIR__.'/views'); |
| 17 | - $this->loadRoutesFrom( __DIR__.'/statistic_route.php'); |
|
| 18 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 17 | + $this->loadRoutesFrom(__DIR__.'/statistic_route.php'); |
|
| 18 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
| 19 | 19 | app('CbDynamicMenus')->addSuperAdminMenu('CbStatistics::menu'); |
| 20 | 20 | $this->registerModule(); |
| 21 | 21 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | //$orig_mainpath = $CbCtrl->data['mainpath']; |
| 79 | 79 | //$titleField = $CbCtrl->titleField; |
| 80 | 80 | $number = (request('page', 1) - 1) * $limit + 1; |
| 81 | - $columnsTable = array_filter($columns, function ($col) { |
|
| 81 | + $columnsTable = array_filter($columns, function($col) { |
|
| 82 | 82 | return $col['visible'] ?? true; |
| 83 | 83 | }); |
| 84 | 84 | $htmlContents = (new RowContent($CbCtrl))->calculate($data, $number, $columnsTable); //end foreach data[result] |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $data['parent_field'] = DbInspector::getRelatedTableName($parent); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - if (! $data['parent_field']) { |
|
| 105 | + if (!$data['parent_field']) { |
|
| 106 | 106 | return $data; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | private function _filterForParent($result) |
| 123 | 123 | { |
| 124 | - if (! request('parent_id')) { |
|
| 124 | + if (!request('parent_id')) { |
|
| 125 | 125 | return null; |
| 126 | 126 | } |
| 127 | 127 | |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | private function _applyWhereAndQfilters($result, $columnsTable, $table) |
| 193 | 193 | { |
| 194 | 194 | if (request('q')) { |
| 195 | - $result->where(function ($query) use ($columnsTable) { |
|
| 195 | + $result->where(function($query) use ($columnsTable) { |
|
| 196 | 196 | foreach ($columnsTable as $col) { |
| 197 | - if (! $col['field_with']) { |
|
| 197 | + if (!$col['field_with']) { |
|
| 198 | 198 | continue; |
| 199 | 199 | } |
| 200 | 200 | $query->orwhere($col['field_with'], "like", "%".request("q")."%"); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | $validator = \Validator::make(request()->all(), $rules); |
| 21 | 21 | |
| 22 | - if (! $validator->fails()) { |
|
| 22 | + if (!$validator->fails()) { |
|
| 23 | 23 | return null; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | $rules = []; |
| 38 | 38 | foreach ($form as $formInput) { |
| 39 | 39 | $name = $formInput['name']; |
| 40 | - if (! $name) { |
|
| 40 | + if (!$name) { |
|
| 41 | 41 | continue; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $ai = []; |
| 45 | - if ($formInput['required'] && ! \Request::hasFile($name)) { |
|
| 45 | + if ($formInput['required'] && !\Request::hasFile($name)) { |
|
| 46 | 46 | $ai[] = 'required'; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | if (is_string($rules)) { |
| 75 | 75 | $exp = explode('|', $rules); |
| 76 | - } elseif(is_array($rules)) { |
|
| 76 | + } elseif (is_array($rules)) { |
|
| 77 | 77 | $exp = $rules; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $uniqueRules = array_filter($exp, function($item){ |
|
| 80 | + $uniqueRules = array_filter($exp, function($item) { |
|
| 81 | 81 | return starts_with($item, 'unique'); |
| 82 | 82 | }); |
| 83 | 83 | |
@@ -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 | respondWith($resp); |
| 36 | 36 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | public function uploadFile($name) |
| 12 | 12 | { |
| 13 | - if (! Request::hasFile($name)) { |
|
| 13 | + if (!Request::hasFile($name)) { |
|
| 14 | 14 | return null; |
| 15 | 15 | } |
| 16 | 16 | $file = Request::file($name); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | private function validateExtension($ext) |
| 35 | 35 | { |
| 36 | - if (! FieldDetector::isUploadField($ext)) { |
|
| 36 | + if (!FieldDetector::isUploadField($ext)) { |
|
| 37 | 37 | respondWith()->json("The filetype is not allowed!"); |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -4,11 +4,11 @@ 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 | |
| 11 | -Route::group(['middleware' => ['web']], function () { |
|
| 11 | +Route::group(['middleware' => ['web']], function() { |
|
| 12 | 12 | Route::get(cbAdminPath(), '\Crocodicstudio\Crudbooster\controllers\DashboardController@index')->name('CbDashboard'); |
| 13 | 13 | }); |
| 14 | 14 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | 'middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBBackend::class], |
| 18 | 18 | 'prefix' => cbAdminPath(), |
| 19 | 19 | 'namespace' => ctrlNamespace(), |
| 20 | -], function () { |
|
| 20 | +], function() { |
|
| 21 | 21 | try { |
| 22 | 22 | $argv = request()->server('argv'); |
| 23 | 23 | if (is_array($argv) && isset($argv[1]) && !starts_with($argv[1], 'route:')) { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | 'middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBSuperadmin::class], |
| 38 | 38 | 'prefix' => cbAdminPath(), |
| 39 | 39 | 'namespace' => $namespace, |
| 40 | -], function () { |
|
| 40 | +], function() { |
|
| 41 | 41 | Route::post('{module}/do-upload-import-data', 'FileController@uploadImportData')->name('UploadImportData'); |
| 42 | 42 | Route::post('{module}/upload-summernote', 'FileController@uploadSummernote')->name('UploadImportData'); |
| 43 | 43 | Route::post('{module}/upload-file', 'FileController@uploadFile')->name('UploadImportData'); |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | 'middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBSuperadmin::class], |
| 5 | 5 | 'prefix' => cbAdminPath(), |
| 6 | 6 | 'namespace' => cbModulesNS('StatisticModule'), |
| 7 | -], function () { |
|
| 7 | +], function() { |
|
| 8 | 8 | Route::get('statistic-builder/', 'AdminStatisticBuilderController@getIndex')->name('AdminStatisticBuilderControllerGetIndex'); |
| 9 | 9 | Route::get('statistic-builder/show-dashboard', 'AdminStatisticBuilderController@getShowDashboard')->name('AdminStatisticBuilderControllerGetShowDashboard'); |
| 10 | 10 | Route::get('statistic-builder/show', 'AdminStatisticBuilderController@getShow')->name('AdminStatisticBuilderControllerGetShow'); |