@@ -71,19 +71,19 @@ discard block |
||
| 71 | 71 | $data['result'] = $query->take($limit)->get(); |
| 72 | 72 | $totalData = count($data['result']); |
| 73 | 73 | return $data; |
| 74 | - }else{ |
|
| 74 | + } else { |
|
| 75 | 75 | $data['result'] = $query->paginate($limit); |
| 76 | 76 | $totalData = $data['result']->total(); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | |
| 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] |
| 85 | 85 | |
| 86 | - $data['html_contents'] = ['html' => $htmlContents, 'data' => $data['result'],'total'=>$totalData]; |
|
| 86 | + $data['html_contents'] = ['html' => $htmlContents, 'data' => $data['result'], 'total'=>$totalData]; |
|
| 87 | 87 | |
| 88 | 88 | return $data; |
| 89 | 89 | } |
@@ -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")."%"); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $data['result'] = $query->take($limit)->get(); |
| 72 | 72 | $totalData = count($data['result']); |
| 73 | 73 | return $data; |
| 74 | - }else{ |
|
| 74 | + } else{ |
|
| 75 | 75 | $data['result'] = $query->paginate($limit); |
| 76 | 76 | $totalData = $data['result']->total(); |
| 77 | 77 | } |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | public function createVendorAtPublic() |
| 22 | 22 | { |
| 23 | 23 | $this->console->info('Checking public/vendor directory...'); |
| 24 | - if (! file_exists(public_path('vendor'))) { |
|
| 24 | + if (!file_exists(public_path('vendor'))) { |
|
| 25 | 25 | mkdir(public_path('vendor'), 0777); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - if (! is_writable(public_path('vendor'))) { |
|
| 28 | + if (!is_writable(public_path('vendor'))) { |
|
| 29 | 29 | $this->console->info('Setup aborted !'); |
| 30 | 30 | $this->console->info('Please set public/vendor directory to writable 0777'); |
| 31 | 31 | exit; |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | $this->limit = request('limit'); |
| 12 | 12 | $this->indexReturn = true; |
| 13 | - $filename = request('filename')?:'export'; |
|
| 13 | + $filename = request('filename') ?: 'export'; |
|
| 14 | 14 | $papersize = request('page_size'); |
| 15 | 15 | $paperorientation = request('page_orientation'); |
| 16 | 16 | $indexContent = $this->getIndex(); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $this->table('cms_settings')->where('name', 'default_paper_size')->update(['content' => $papersize]); |
| 20 | 20 | } |
| 21 | 21 | $format = request('fileformat'); |
| 22 | - if(in_array($format, ['pdf', 'xls', 'csv'])) |
|
| 22 | + if (in_array($format, ['pdf', 'xls', 'csv'])) |
|
| 23 | 23 | { |
| 24 | 24 | return app(IndexExport::class)->{$format}($filename, $indexContent, $paperorientation, $papersize); |
| 25 | 25 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $selectedIds = request('checkbox'); |
| 24 | 24 | |
| 25 | 25 | $btnName = request('button_name'); |
| 26 | - if (! $selectedIds) { |
|
| 26 | + if (!$selectedIds) { |
|
| 27 | 27 | backWithMsg(cbTrans('at_least_one_row'), 'warning'); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | $message = cbTrans('alert_action', ['action' => $action]); |
| 48 | 48 | |
| 49 | 49 | if ($this->actionButtonSelected($id_selected, $button_name) === false) { |
| 50 | - $message = ! empty($this->alert['message']) ? $this->alert['message'] : 'Error'; |
|
| 51 | - $type = ! empty($this->alert['type']) ? $this->alert['type'] : 'danger'; |
|
| 50 | + $message = !empty($this->alert['message']) ? $this->alert['message'] : 'Error'; |
|
| 51 | + $type = !empty($this->alert['type']) ? $this->alert['type'] : 'danger'; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | backWithMsg($message, $type); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | public function uploadSummernote() |
| 18 | 18 | { |
| 19 | - echo asset(app( FileUploader::class)->uploadFile('userfile')); |
|
| 19 | + echo asset(app(FileUploader::class)->uploadFile('userfile')); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function uploadFile() |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $import = app(IndexImport::class); |
| 30 | 30 | |
| 31 | - if (! Request::hasFile('userfile')) { |
|
| 32 | - backWithMsg('Please select a file for first!','warning'); |
|
| 31 | + if (!Request::hasFile('userfile')) { |
|
| 32 | + backWithMsg('Please select a file for first!', 'warning'); |
|
| 33 | 33 | } |
| 34 | 34 | $file = Request::file('userfile'); |
| 35 | 35 | $validator = $import->validateForImport($file); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $fullStoragePath = storage_path('app/'.$fullFilePath); |
| 52 | 52 | |
| 53 | 53 | |
| 54 | - if (! Storage::exists($fullFilePath)) { |
|
| 54 | + if (!Storage::exists($fullFilePath)) { |
|
| 55 | 55 | abort(404); |
| 56 | 56 | } |
| 57 | 57 | $hasImageExtension = $this->isImage($fullStoragePath); |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | $w = request('w', cbConfig('DEFAULT_THUMBNAIL_WIDTH', 300)); |
| 88 | 88 | $h = request('h', $w); |
| 89 | - $imgRaw = Image::cache(function ($image) use ($fullStoragePath, $w, $h) { |
|
| 89 | + $imgRaw = Image::cache(function($image) use ($fullStoragePath, $w, $h) { |
|
| 90 | 90 | $im = $image->make($fullStoragePath); |
| 91 | - if (! $w) { |
|
| 91 | + if (!$w) { |
|
| 92 | 92 | return $im; |
| 93 | 93 | } |
| 94 | - if (! $h) { |
|
| 94 | + if (!$h) { |
|
| 95 | 95 | $im->fit($w); |
| 96 | 96 | } else { |
| 97 | 97 | $im->fit($w, $h); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $extension = strtolower(File::extension($fullStoragePath)); |
| 113 | 113 | |
| 114 | - return FieldDetector::isWithin($extension, 'IMAGE_EXTENSIONS');; |
|
| 114 | + return FieldDetector::isWithin($extension, 'IMAGE_EXTENSIONS'); ; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $data = app(Index::class)->index($this); |
| 63 | 63 | |
| 64 | - if($this->indexReturn) return $data; |
|
| 64 | + if ($this->indexReturn) return $data; |
|
| 65 | 65 | |
| 66 | 66 | return $this->cbView('crudbooster::index.index', $data); |
| 67 | 67 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | protected function genericLoader() |
| 146 | 146 | { |
| 147 | 147 | $this->cbInit(); |
| 148 | - $this->primaryKey = $this->primaryKey?: DbInspector::findPk($this->table); |
|
| 148 | + $this->primaryKey = $this->primaryKey ?: DbInspector::findPk($this->table); |
|
| 149 | 149 | $this->data_inputan = $this->form; |
| 150 | 150 | $this->data['pk'] = $this->primaryKey; |
| 151 | 151 | $this->data['hide_form'] = $this->hide_form; |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | |
| 62 | 62 | $data = app(Index::class)->index($this); |
| 63 | 63 | |
| 64 | - if($this->indexReturn) return $data; |
|
| 64 | + if($this->indexReturn) { |
|
| 65 | + return $data; |
|
| 66 | + } |
|
| 65 | 67 | |
| 66 | 68 | return $this->cbView('crudbooster::index.index', $data); |
| 67 | 69 | } |
@@ -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',\Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBBackend::class]], function () { |
|
| 11 | +Route::group(['middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBBackend::class]], function() { |
|
| 12 | 12 | Route::get(cbAdminPath(), '\Crocodicstudio\Crudbooster\Controllers\DashboardController@index')->name('CbDashboard'); |
| 13 | 13 | }); |
| 14 | 14 | |
@@ -17,11 +17,11 @@ 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 | $args = request()->server('argv'); |
| 23 | 23 | if ($args && $args !== ['artisan', 'route:list']) { |
| 24 | - return ; |
|
| 24 | + return; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $modules = DB::table('cms_modules')->where('path', '!=', '')->where('controller', '!=', '')->where('is_protected', 0)->get(); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | 'middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBSuperadmin::class], |
| 39 | 39 | 'prefix' => cbAdminPath(), |
| 40 | 40 | 'namespace' => $namespace, |
| 41 | -], function () { |
|
| 41 | +], function() { |
|
| 42 | 42 | Route::post('{module}/do-upload-import-data', 'FileController@doUploadImportData')->name('FileControllerDoUploadImportData'); |
| 43 | 43 | Route::post('{module}/upload-summernote', 'FileController@uploadSummernote')->name('FileControllerUploadSummernote'); |
| 44 | 44 | Route::post('{module}/upload-file', 'FileController@uploadFile')->name('FileControllerUploadFile'); |
@@ -8,49 +8,49 @@ discard block |
||
| 8 | 8 | | --------------------------------------------------------------------------------------------------------------- |
| 9 | 9 | | |
| 10 | 10 | */ |
| 11 | -if (! function_exists('cbModulesNS')) { |
|
| 11 | +if (!function_exists('cbModulesNS')) { |
|
| 12 | 12 | function cbModulesNS(string $path = ''): string |
| 13 | 13 | { |
| 14 | 14 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::cbModulesNS($path); |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if (! function_exists('cbStartMarker')) { |
|
| 18 | +if (!function_exists('cbStartMarker')) { |
|
| 19 | 19 | function cbStartMarker(string $section): string |
| 20 | 20 | { |
| 21 | 21 | return "# START $section DO NOT REMOVE THIS LINE"; |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -if (! function_exists('cbEndMarker')) { |
|
| 25 | +if (!function_exists('cbEndMarker')) { |
|
| 26 | 26 | function cbEndMarker(string $section): string |
| 27 | 27 | { |
| 28 | 28 | return "# END $section DO NOT REMOVE THIS LINE"; |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | -if (! function_exists('cbAdminPath')) { |
|
| 32 | +if (!function_exists('cbAdminPath')) { |
|
| 33 | 33 | function cbAdminPath(): string |
| 34 | 34 | { |
| 35 | 35 | return cbConfig('ADMIN_PATH'); |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -if (! function_exists('ctrlNamespace')) { |
|
| 39 | +if (!function_exists('ctrlNamespace')) { |
|
| 40 | 40 | function ctrlNamespace(): string |
| 41 | 41 | { |
| 42 | 42 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::ctrlNamespace(); |
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | -if (! function_exists('cbControllersNS')) { |
|
| 46 | +if (!function_exists('cbControllersNS')) { |
|
| 47 | 47 | function cbControllersNS(): string |
| 48 | 48 | { |
| 49 | 49 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::cbControllersNS(); |
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | -if (! function_exists('is_checked')) { |
|
| 53 | +if (!function_exists('is_checked')) { |
|
| 54 | 54 | /** |
| 55 | 55 | * @param $format |
| 56 | 56 | * @param $value |
@@ -74,28 +74,28 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -if (! function_exists('CbComponentsPath')) { |
|
| 77 | +if (!function_exists('CbComponentsPath')) { |
|
| 78 | 78 | function CbComponentsPath(string $type = ''): string |
| 79 | 79 | { |
| 80 | 80 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::componentsPath($type); |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | -if (! function_exists('CbPublishedComponentsPath')) { |
|
| 84 | +if (!function_exists('CbPublishedComponentsPath')) { |
|
| 85 | 85 | function CbPublishedComponentsPath(string $type = ''): string |
| 86 | 86 | { |
| 87 | 87 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::publishedComponentsPath($type); |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | -if (! function_exists('controllers_dir')) { |
|
| 91 | +if (!function_exists('controllers_dir')) { |
|
| 92 | 92 | function controllers_dir(): string |
| 93 | 93 | { |
| 94 | 94 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::controllersDir(); |
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | -if (! function_exists('controller_path')) { |
|
| 98 | +if (!function_exists('controller_path')) { |
|
| 99 | 99 | function controller_path(string $controller): string |
| 100 | 100 | { |
| 101 | 101 | return \Crocodicstudio\Crudbooster\Helpers\CbStructure::controllerPath($controller); |
@@ -109,14 +109,14 @@ discard block |
||
| 109 | 109 | | $name = name of input |
| 110 | 110 | | |
| 111 | 111 | */ |
| 112 | -if (! function_exists('g')) { |
|
| 112 | +if (!function_exists('g')) { |
|
| 113 | 113 | function g($name) |
| 114 | 114 | { |
| 115 | 115 | return Request::get($name); |
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | -if (! function_exists('cbTrans')) { |
|
| 119 | +if (!function_exists('cbTrans')) { |
|
| 120 | 120 | /** |
| 121 | 121 | * Translate the given message. |
| 122 | 122 | * |
@@ -130,44 +130,44 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -if (! function_exists('cbAsset')) { |
|
| 133 | +if (!function_exists('cbAsset')) { |
|
| 134 | 134 | function cbAsset($key) |
| 135 | 135 | { |
| 136 | 136 | return asset('vendor/crudbooster/assets/'.$key); |
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | -if(! function_exists('cbAnchor')) { |
|
| 141 | - function cbAnchor($url,$label,$attribute="") { |
|
| 140 | +if (!function_exists('cbAnchor')) { |
|
| 141 | + function cbAnchor($url, $label, $attribute = "") { |
|
| 142 | 142 | return "<a href='".$url."' ".$attribute." >".$label."</a>"; |
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | -if (! function_exists('cbScript')) { |
|
| 146 | +if (!function_exists('cbScript')) { |
|
| 147 | 147 | function cbScript($key) |
| 148 | 148 | { |
| 149 | 149 | return '<script src="'.cbAsset($key).'" type="text/javascript"></script>'; |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | -if (! function_exists('cbStyleSheet')) { |
|
| 153 | +if (!function_exists('cbStyleSheet')) { |
|
| 154 | 154 | function cbStyleSheet($key) |
| 155 | 155 | { |
| 156 | 156 | return '<link rel="stylesheet" type="text/css" href="'.cbAsset($key).'"/>'; |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | -if (! function_exists('cbConfig')) { |
|
| 160 | +if (!function_exists('cbConfig')) { |
|
| 161 | 161 | function cbConfig($key, $default = null) |
| 162 | 162 | { |
| 163 | 163 | return config('crudbooster.'.$key, $default); |
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | -if (! function_exists('makeValidationForHTML')) { |
|
| 166 | +if (!function_exists('makeValidationForHTML')) { |
|
| 167 | 167 | function makeValidationForHTML($rules) |
| 168 | 168 | { |
| 169 | 169 | $validation = []; |
| 170 | - $validation_raw = is_string($rules)? explode('|', $rules) : $rules; |
|
| 170 | + $validation_raw = is_string($rules) ? explode('|', $rules) : $rules; |
|
| 171 | 171 | foreach ($validation_raw as $vr) { |
| 172 | 172 | $vr_a = explode(':', $vr); |
| 173 | 173 | if (isset($vr_a[1])) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | -if (! function_exists('findSelected')) { |
|
| 184 | +if (!function_exists('findSelected')) { |
|
| 185 | 185 | /** |
| 186 | 186 | * @param $rawvalue |
| 187 | 187 | * @param $form |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | function findSelected($rawvalue, $form, $optionValue) |
| 192 | 192 | { |
| 193 | - if (! $rawvalue) { |
|
| 193 | + if (!$rawvalue) { |
|
| 194 | 194 | return ''; |
| 195 | 195 | } |
| 196 | 196 | $value = $rawvalue; |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | return $selected; |
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | -if (! function_exists('array_get_keys')) { |
|
| 215 | +if (!function_exists('array_get_keys')) { |
|
| 216 | 216 | |
| 217 | 217 | /** |
| 218 | 218 | * @param array $_array |
@@ -228,21 +228,21 @@ discard block |
||
| 228 | 228 | } |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | -if (! function_exists('cbGetSetting')) { |
|
| 231 | +if (!function_exists('cbGetSetting')) { |
|
| 232 | 232 | function cbGetSetting($name) |
| 233 | 233 | { |
| 234 | 234 | return \Crocodicstudio\Crudbooster\Modules\SettingModule\SettingRepo::getSetting($name); |
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | -if (! function_exists('backWithMsg')) { |
|
| 238 | +if (!function_exists('backWithMsg')) { |
|
| 239 | 239 | function backWithMsg($msg, $type = 'success') |
| 240 | 240 | { |
| 241 | - respondWith(redirect()->back()->with(['message' => $msg, 'message_type' => $type,])); |
|
| 241 | + respondWith(redirect()->back()->with(['message' => $msg, 'message_type' => $type, ])); |
|
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | -if (! function_exists('underField')) { |
|
| 245 | +if (!function_exists('underField')) { |
|
| 246 | 246 | function underField($help, $error) |
| 247 | 247 | { |
| 248 | 248 | $error = $error ? "<i class='fa fa-info-circle'></i> $error" : ''; |
@@ -250,21 +250,21 @@ discard block |
||
| 250 | 250 | return "<div class='text-danger'>$error</div><p class='help-block'>$help</p>"; |
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | -if (! function_exists('cbIcon')) { |
|
| 253 | +if (!function_exists('cbIcon')) { |
|
| 254 | 254 | function cbIcon($icon) |
| 255 | 255 | { |
| 256 | 256 | return '<i class=\'fa fa-'.$icon.'\'></i>'; |
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | -if (! function_exists('YmdHis')) { |
|
| 260 | +if (!function_exists('YmdHis')) { |
|
| 261 | 261 | function YmdHis() |
| 262 | 262 | { |
| 263 | 263 | return date('Y-m-d H:i:s'); |
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | -if (! function_exists('cbUser')) { |
|
| 267 | +if (!function_exists('cbUser')) { |
|
| 268 | 268 | function cbUser() |
| 269 | 269 | { |
| 270 | 270 | return auth('cbAdmin')->user(); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | class CSSBootstrap |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - public static function label($label,$class='warning') { |
|
| 9 | - return "<span class='label label-".$class."'>".$label."</span>"; |
|
| 10 | - } |
|
| 8 | + public static function label($label,$class='warning') { |
|
| 9 | + return "<span class='label label-".$class."'>".$label."</span>"; |
|
| 10 | + } |
|
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | class CSSBootstrap |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - public static function label($label,$class='warning') { |
|
| 8 | + public static function label($label, $class = 'warning') { |
|
| 9 | 9 | return "<span class='label label-".$class."'>".$label."</span>"; |
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |