@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if ($filter_is_orderby === true) { |
67 | 67 | (new Order($this->cb))->handle($query, $table); |
68 | 68 | } |
69 | - $limit = is_string($limit) ? (int)$limit : 15; |
|
69 | + $limit = is_string($limit) ? (int) $limit : 15; |
|
70 | 70 | $data['result'] = $query->paginate($limit); |
71 | 71 | |
72 | 72 | $data['columns'] = $columns_table; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | //LISTING INDEX HTML |
79 | 79 | $addAction = $CbCtrl->data['addAction']; |
80 | 80 | |
81 | - if (! empty($CbCtrl->sub_module)) { |
|
81 | + if (!empty($CbCtrl->sub_module)) { |
|
82 | 82 | $addAction = $this->_handleSubModules($addAction); |
83 | 83 | } |
84 | 84 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | //$orig_mainpath = $CbCtrl->data['mainpath']; |
87 | 87 | //$titleField = $CbCtrl->titleField; |
88 | 88 | $number = (request('page', 1) - 1) * $limit + 1; |
89 | - $columnsTable = array_filter($columns_table, function ($col) { |
|
89 | + $columnsTable = array_filter($columns_table, function($col) { |
|
90 | 90 | return $col['visible'] !== false; |
91 | 91 | }); |
92 | 92 | $htmlContents = (new RowContent($CbCtrl))->calculate($data, $number, $columnsTable, $addAction); //end foreach data[result] |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | private function _handleParentTable() |
103 | 103 | { |
104 | 104 | $data = []; |
105 | - $parent = (string)request('parent_table'); |
|
105 | + $parent = (string) request('parent_table'); |
|
106 | 106 | $data['parent_table'] = CRUDBooster::first(request('parent_table'), request('parent_id')); |
107 | 107 | if (request('foreign_key')) { |
108 | 108 | $data['parent_field'] = request('foreign_key'); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $data['parent_field'] = DbInspector::getTableForeignKey($parent); |
111 | 111 | } |
112 | 112 | |
113 | - if (! $data['parent_field']) { |
|
113 | + if (!$data['parent_field']) { |
|
114 | 114 | return $data; |
115 | 115 | } |
116 | 116 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private function _filterForParent($result) |
130 | 130 | { |
131 | - if (! request('parent_id')) { |
|
131 | + if (!request('parent_id')) { |
|
132 | 132 | return null; |
133 | 133 | } |
134 | 134 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | private function _filterOutSoftDeleted($tableColumns, $result) |
144 | 144 | { |
145 | - if (! in_array('deleted_at', $tableColumns)) { |
|
145 | + if (!in_array('deleted_at', $tableColumns)) { |
|
146 | 146 | return; |
147 | 147 | } |
148 | 148 | $result->where($this->table.'.deleted_at', '=', null); |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | private function _applyWhereAndQfilters($result, $columnsTable, $table) |
202 | 202 | { |
203 | 203 | if (request('q')) { |
204 | - $result->where(function ($query) use ($columnsTable) { |
|
204 | + $result->where(function($query) use ($columnsTable) { |
|
205 | 205 | foreach ($columnsTable as $col) { |
206 | - if (! $col['field_with']) { |
|
206 | + if (!$col['field_with']) { |
|
207 | 207 | continue; |
208 | 208 | } |
209 | 209 | $query->orwhere($col['field_with'], "like", "%".request("q")."%"); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns=' |
248 | 248 | .$module['parent_columns'].'&parent_columns_alias=' |
249 | 249 | .$module['parent_columns_alias'].'&parent_id=[' |
250 | - .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
250 | + .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
251 | 251 | .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key=' |
252 | 252 | .$module['foreign_key'].'&label='.urlencode($module['label']); |
253 | 253 | } |