@@ -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(); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | public function edit($id) |
| 118 | 118 | { |
| 119 | - if (! $this->entityInstance) { |
|
| 119 | + if (!$this->entityInstance) { |
|
| 120 | 120 | $this->entityInstance = $this->entity->findOrFail($id); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | if ($request->get('q') != '') { |
| 242 | 242 | $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable; |
| 243 | 243 | |
| 244 | - $entity = $entity->where(function ($query) use ($request, $searchableCols) { |
|
| 244 | + $entity = $entity->where(function($query) use ($request, $searchableCols) { |
|
| 245 | 245 | foreach ($searchableCols as $field) { |
| 246 | 246 | $query->orWhere($field, 'like', '%'.$request->get('q').'%'); |
| 247 | 247 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | $config['options'] = isset($config['options']) ? $config['options'] : []; |
| 299 | 299 | $config['cols'] = isset($config['cols']) ? $config['cols'] : 1; |
| 300 | 300 | |
| 301 | - if (! count($config['options']) && isset($config['entity'])) { |
|
| 301 | + if (!count($config['options']) && isset($config['entity'])) { |
|
| 302 | 302 | $config['options'] = $config['entity']::get() |
| 303 | 303 | ->lists($config['field_value'], $config['field_key']) |
| 304 | 304 | ->toArray(); |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $links = ['index', 'create', 'store']; |
| 336 | 336 | |
| 337 | 337 | foreach ($links as $link) { |
| 338 | - if (! isset($this->links[$link])) { |
|
| 338 | + if (!isset($this->links[$link])) { |
|
| 339 | 339 | $this->links[$link] = route($this->route.'.'.$link); |
| 340 | 340 | } |
| 341 | 341 | } |