@@ -178,6 +178,9 @@ discard block |
||
178 | 178 | |
179 | 179 | /* Private Actions */ |
180 | 180 | |
181 | + /** |
|
182 | + * @param Request $request |
|
183 | + */ |
|
181 | 184 | protected function filters($entity, $request) |
182 | 185 | { |
183 | 186 | if ($request->query('filter')) { |
@@ -219,6 +222,9 @@ discard block |
||
219 | 222 | } |
220 | 223 | } |
221 | 224 | |
225 | + /** |
|
226 | + * @param Request $request |
|
227 | + */ |
|
222 | 228 | protected function paginate($entity, $request) |
223 | 229 | { |
224 | 230 | $rows = $entity->paginate($this->paginate); |
@@ -236,6 +242,9 @@ discard block |
||
236 | 242 | return $rows; |
237 | 243 | } |
238 | 244 | |
245 | + /** |
|
246 | + * @param Request $request |
|
247 | + */ |
|
239 | 248 | protected function search($entity, $request) |
240 | 249 | { |
241 | 250 | if ($request->get('q') != '') { |
@@ -281,6 +290,9 @@ discard block |
||
281 | 290 | return $fields; |
282 | 291 | } |
283 | 292 | |
293 | + /** |
|
294 | + * @param Request $request |
|
295 | + */ |
|
284 | 296 | protected function updateForeignRelations($row, $request) |
285 | 297 | { |
286 | 298 | $foreignRelations = $this->getForeignRelationsFields(); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | if ($request->get('q') != '') { |
245 | 245 | $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable; |
246 | 246 | |
247 | - $entity = $entity->where(function ($query) use ($request, $searchableCols) { |
|
247 | + $entity = $entity->where(function($query) use ($request, $searchableCols) { |
|
248 | 248 | foreach ($searchableCols as $field) { |
249 | 249 | $query->orWhere($field, 'like', '%'.$request->get('q').'%'); |
250 | 250 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | foreach ($foreignRelations as $foreignRelation) { |
292 | 292 | $values = $request->get($foreignRelation); |
293 | - $row->$foreignRelation()->sync((array)$values); |
|
293 | + $row->$foreignRelation()->sync((array) $values); |
|
294 | 294 | } |
295 | 295 | } |
296 | 296 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $uniqueId = uniqid('opt', true).md5(mt_rand(1, 1000)); |
15 | 15 | $html .= |
16 | 16 | '<div class="col-md-'.$colsSize.' col-xs-12">'. |
17 | - \Form::checkbox($name.'[]', $key, in_array($key, (array)$value) ? true : false, ['id' => $uniqueId]). |
|
17 | + \Form::checkbox($name.'[]', $key, in_array($key, (array) $value) ? true : false, ['id' => $uniqueId]). |
|
18 | 18 | \Form::label($uniqueId, $option). |
19 | 19 | '</div>'; |
20 | 20 | } |