@@ -5,7 +5,7 @@ |
||
5 | 5 | 'prefix' => 'crud', |
6 | 6 | 'namespace' => 'Anavel\Crud\Http\Controllers' |
7 | 7 | ], |
8 | - function () { |
|
8 | + function() { |
|
9 | 9 | Route::get('/', [ |
10 | 10 | 'as' => 'anavel-crud.home', |
11 | 11 | 'uses' => 'HomeController@index' |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | use EasySlugger\Slugger; |
4 | 4 | |
5 | -if (! function_exists('slugify')) { |
|
5 | +if (!function_exists('slugify')) { |
|
6 | 6 | /** |
7 | 7 | * Generate slug |
8 | 8 | * |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | -if (! function_exists('uniqueSlugify')) { |
|
18 | +if (!function_exists('uniqueSlugify')) { |
|
19 | 19 | /** |
20 | 20 | * Generate unique slug |
21 | 21 | * |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | -if (! function_exists('transcrud')) { |
|
31 | +if (!function_exists('transcrud')) { |
|
32 | 32 | /** |
33 | 33 | * Translate string but remove file key if translation not found |
34 | 34 | * |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | function transcrud($text) |
39 | 39 | { |
40 | - $translation = trans('anavel-crud::models.' . $text); |
|
40 | + $translation = trans('anavel-crud::models.'.$text); |
|
41 | 41 | |
42 | 42 | return str_replace('anavel-crud::models.', '', $translation); |
43 | 43 | } |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Anavel\Crud\Abstractor\Eloquent\Relation\Traits\CheckRelationCompatibility; |
5 | 5 | use Anavel\Crud\Contracts\Abstractor\Field; |
6 | -use App; |
|
7 | 6 | use Illuminate\Http\Request; |
8 | 7 | |
9 | 8 | class Translation extends Relation |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $config = [ |
124 | 124 | 'name' => $columnName, |
125 | - 'presentation' => $this->name . ' ' . ucfirst(transcrud($columnName)), |
|
125 | + 'presentation' => $this->name.' '.ucfirst(transcrud($columnName)), |
|
126 | 126 | 'form_type' => $formType, |
127 | 127 | 'no_validate' => true, |
128 | 128 | 'validation' => null, |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $field = $this->fieldFactory |
144 | 144 | ->setColumn($column) |
145 | 145 | ->setConfig([ |
146 | - 'name' => $columnName . '__delete', |
|
146 | + 'name' => $columnName.'__delete', |
|
147 | 147 | 'presentation' => null, |
148 | 148 | 'form_type' => 'checkbox', |
149 | 149 | 'no_validate' => true, |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'functions' => null |
152 | 152 | ]) |
153 | 153 | ->get(); |
154 | - $fields[$columnName . '__delete'] = $field; |
|
154 | + $fields[$columnName.'__delete'] = $field; |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | } |
@@ -195,12 +195,12 @@ discard block |
||
195 | 195 | $fieldName = $field->getName(); |
196 | 196 | |
197 | 197 | if (get_class($field->getFormField()) === \FormManager\Fields\File::class) { |
198 | - $handleResult = $this->handleField($request, $relationModel, $fieldsBase, $this->name . ".$relationIndex", $fieldName); |
|
199 | - if (! empty($handleResult['skip'])) { |
|
198 | + $handleResult = $this->handleField($request, $relationModel, $fieldsBase, $this->name.".$relationIndex", $fieldName); |
|
199 | + if (!empty($handleResult['skip'])) { |
|
200 | 200 | $skip = $handleResult['skip']; |
201 | 201 | unset($relationArray[$relationIndex][$skip]); |
202 | 202 | } |
203 | - if (! empty($handleResult['requestValue'])) { |
|
203 | + if (!empty($handleResult['requestValue'])) { |
|
204 | 204 | $relationArray[$relationIndex][$fieldName] = $handleResult['requestValue']; |
205 | 205 | } |
206 | 206 | } |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return transcrud($this->name); |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
88 | 91 | public function getModel() |
89 | 92 | { |
90 | 93 | return $this->model; |
@@ -334,7 +337,7 @@ discard block |
||
334 | 337 | } |
335 | 338 | |
336 | 339 | /** |
337 | - * @param array $requestForm |
|
340 | + * @param array $request |
|
338 | 341 | * @return mixed |
339 | 342 | */ |
340 | 343 | public function persist(Request $request) |
@@ -16,8 +16,6 @@ |
||
16 | 16 | use Anavel\Crud\Abstractor\Exceptions\AbstractorException; |
17 | 17 | use Illuminate\Http\Request; |
18 | 18 | use Illuminate\Support\Collection; |
19 | -use League\Flysystem\Adapter\Local; |
|
20 | -use League\Flysystem\Filesystem; |
|
21 | 19 | |
22 | 20 | class Model implements ModelAbstractorContract |
23 | 21 | { |
@@ -128,32 +128,32 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | $customDisplayedColumns = $this->getConfigValue($action, 'display'); |
131 | - $customHiddenColumns = $this->getConfigValue($action, 'hide') ? : []; |
|
131 | + $customHiddenColumns = $this->getConfigValue($action, 'hide') ?: []; |
|
132 | 132 | |
133 | 133 | $relations = $this->getRelations(); |
134 | 134 | |
135 | 135 | $columns = array(); |
136 | - if (! empty($customDisplayedColumns) && is_array($customDisplayedColumns)) { |
|
136 | + if (!empty($customDisplayedColumns) && is_array($customDisplayedColumns)) { |
|
137 | 137 | foreach ($customDisplayedColumns as $customColumn) { |
138 | 138 | if (strpos($customColumn, '.')) { |
139 | 139 | $customColumnRelation = explode('.', $customColumn); |
140 | 140 | |
141 | - if (! $relations->has($customColumnRelation[0])) { |
|
142 | - throw new AbstractorException("Relation " . $customColumnRelation[0] . " not configured on " . $this->getModel()); |
|
141 | + if (!$relations->has($customColumnRelation[0])) { |
|
142 | + throw new AbstractorException("Relation ".$customColumnRelation[0]." not configured on ".$this->getModel()); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $relation = $relations->get($customColumnRelation[0]); |
146 | 146 | |
147 | 147 | $relationColumns = $relation->getModelAbstractor()->getColumns($action); |
148 | 148 | |
149 | - if (! array_key_exists($customColumnRelation[1], $relationColumns)) { |
|
150 | - throw new AbstractorException("Column " . $customColumnRelation[1] . " does not exist on relation ".$customColumnRelation[0]. " of model " . $this->getModel()); |
|
149 | + if (!array_key_exists($customColumnRelation[1], $relationColumns)) { |
|
150 | + throw new AbstractorException("Column ".$customColumnRelation[1]." does not exist on relation ".$customColumnRelation[0]." of model ".$this->getModel()); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $columns[$customColumn] = $relationColumns[$customColumnRelation[1]]; |
154 | 154 | } else { |
155 | - if (! array_key_exists($customColumn, $tableColumns)) { |
|
156 | - throw new AbstractorException("Column " . $customColumn . " does not exist on " . $this->getModel()); |
|
155 | + if (!array_key_exists($customColumn, $tableColumns)) { |
|
156 | + throw new AbstractorException("Column ".$customColumn." does not exist on ".$this->getModel()); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | $columns[$customColumn] = $tableColumns[$customColumn]; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | $relations = collect(); |
187 | 187 | |
188 | - if (! empty($configRelations)) { |
|
188 | + if (!empty($configRelations)) { |
|
189 | 189 | foreach ($configRelations as $relationName => $configRelation) { |
190 | 190 | if (is_int($relationName)) { |
191 | 191 | $relationName = $configRelation; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | $config = []; |
195 | 195 | if ($configRelation !== $relationName) { |
196 | - if (! is_array($configRelation)) { |
|
196 | + if (!is_array($configRelation)) { |
|
197 | 197 | $config['type'] = $configRelation; |
198 | 198 | } else { |
199 | 199 | $config = $configRelation; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $secondaryRelations = $relation->getSecondaryRelations(); |
209 | 209 | |
210 | 210 | |
211 | - if (! $secondaryRelations->isEmpty()) { |
|
211 | + if (!$secondaryRelations->isEmpty()) { |
|
212 | 212 | $relations->put( |
213 | 213 | $relationName, |
214 | 214 | collect(['relation' => $relation, 'secondaryRelations' => $secondaryRelations]) |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | { |
233 | 233 | $columns = $this->getColumns('list'); |
234 | 234 | |
235 | - $fieldsPresentation = $this->getConfigValue('fields_presentation') ? : []; |
|
235 | + $fieldsPresentation = $this->getConfigValue('fields_presentation') ?: []; |
|
236 | 236 | |
237 | 237 | $fields = array(); |
238 | 238 | foreach ($columns as $name => $column) { |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | { |
268 | 268 | $columns = $this->getColumns('detail'); |
269 | 269 | |
270 | - $fieldsPresentation = $this->getConfigValue('fields_presentation') ? : []; |
|
270 | + $fieldsPresentation = $this->getConfigValue('fields_presentation') ?: []; |
|
271 | 271 | |
272 | 272 | $fields = array(); |
273 | 273 | foreach ($columns as $name => $column) { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | |
308 | 308 | $fields = array(); |
309 | 309 | foreach ($columns as $name => $column) { |
310 | - if (! in_array($name, $this->getReadOnlyColumns())) { |
|
310 | + if (!in_array($name, $this->getReadOnlyColumns())) { |
|
311 | 311 | $presentation = null; |
312 | 312 | if (array_key_exists($name, $this->fieldsPresentation)) { |
313 | 313 | $presentation = $this->fieldsPresentation[$name]; |
@@ -328,24 +328,24 @@ discard block |
||
328 | 328 | ->setConfig($config) |
329 | 329 | ->get(); |
330 | 330 | |
331 | - if (! empty($this->instance) && ! empty($this->instance->getAttribute($name))) { |
|
331 | + if (!empty($this->instance) && !empty($this->instance->getAttribute($name))) { |
|
332 | 332 | $field->setValue($this->instance->getAttribute($name)); |
333 | 333 | } |
334 | 334 | |
335 | 335 | $fields[$arrayKey][$name] = $field; |
336 | 336 | |
337 | - if (! empty($config['form_type']) && $config['form_type'] === 'file') { |
|
337 | + if (!empty($config['form_type']) && $config['form_type'] === 'file') { |
|
338 | 338 | $field = $this->fieldFactory |
339 | 339 | ->setColumn($column) |
340 | 340 | ->setConfig([ |
341 | - 'name' => $name . '__delete', |
|
341 | + 'name' => $name.'__delete', |
|
342 | 342 | 'presentation' => null, |
343 | 343 | 'form_type' => 'checkbox', |
344 | 344 | 'no_validate' => true, |
345 | 345 | 'functions' => null |
346 | 346 | ]) |
347 | 347 | ->get(); |
348 | - $fields[$arrayKey][$name . '__delete'] = $field; |
|
348 | + $fields[$arrayKey][$name.'__delete'] = $field; |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | { |
383 | 383 | /** @var \ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager $modelManager */ |
384 | 384 | $modelManager = App::make('ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'); |
385 | - if (! empty($this->instance)) { |
|
385 | + if (!empty($this->instance)) { |
|
386 | 386 | $item = $this->instance; |
387 | 387 | } else { |
388 | 388 | $item = $modelManager->getModelInstance($this->getModel()); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | return; |
395 | 395 | } |
396 | 396 | |
397 | - if (! empty($fields['main'])) { |
|
397 | + if (!empty($fields['main'])) { |
|
398 | 398 | $skip = null; |
399 | 399 | foreach ($fields['main'] as $key => $field) { |
400 | 400 | /** @var FieldContract $field */ |
@@ -419,20 +419,20 @@ discard block |
||
419 | 419 | |
420 | 420 | if (get_class($field->getFormField()) === \FormManager\Fields\File::class) { |
421 | 421 | $handleResult = $this->handleField($request, $item, $fields['main'], 'main', $fieldName); |
422 | - if (! empty($handleResult['skip'])) { |
|
422 | + if (!empty($handleResult['skip'])) { |
|
423 | 423 | $skip = $handleResult['skip']; |
424 | 424 | } |
425 | - if (! empty($handleResult['requestValue'])) { |
|
425 | + if (!empty($handleResult['requestValue'])) { |
|
426 | 426 | $requestValue = $handleResult['requestValue']; |
427 | 427 | } |
428 | 428 | } |
429 | 429 | |
430 | 430 | |
431 | - if (! $field->saveIfEmpty() && empty($requestValue)) { |
|
431 | + if (!$field->saveIfEmpty() && empty($requestValue)) { |
|
432 | 432 | continue; |
433 | 433 | } |
434 | 434 | |
435 | - if (! empty($requestValue) || (empty($requestValue) && ! empty($item->getAttribute($fieldName)))) { |
|
435 | + if (!empty($requestValue) || (empty($requestValue) && !empty($item->getAttribute($fieldName)))) { |
|
436 | 436 | $item->setAttribute( |
437 | 437 | $fieldName, |
438 | 438 | $field->applyFunctions($requestValue) |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $this->setInstance($item); |
447 | 447 | |
448 | 448 | |
449 | - if (! empty($relations = $this->getRelations())) { |
|
449 | + if (!empty($relations = $this->getRelations())) { |
|
450 | 450 | foreach ($relations as $relationKey => $relation) { |
451 | 451 | if ($relation instanceof Collection) { |
452 | 452 | $input = $request->input($relationKey); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * @param array $config |
29 | 29 | * @param string $columnName |
30 | - * @return array |
|
30 | + * @return \Doctrine\DBAL\Schema\Column |
|
31 | 31 | */ |
32 | 32 | public function setConfig(array $config, $columnName) |
33 | 33 | { |
@@ -17,11 +17,11 @@ |
||
17 | 17 | */ |
18 | 18 | public function readConfig($action) |
19 | 19 | { |
20 | - $this->fieldsPresentation = $this->getConfigValue('fields_presentation') ? : []; |
|
21 | - $this->formTypes = $this->getConfigValue($action, 'form_types') ? : []; |
|
22 | - $this->validationRules = $this->getConfigValue($action, 'validation') ? : []; |
|
23 | - $this->functions = $this->getConfigValue($action, 'functions') ? : []; |
|
24 | - $this->defaults = $this->getConfigValue($action, 'defaults') ? : []; |
|
20 | + $this->fieldsPresentation = $this->getConfigValue('fields_presentation') ?: []; |
|
21 | + $this->formTypes = $this->getConfigValue($action, 'form_types') ?: []; |
|
22 | + $this->validationRules = $this->getConfigValue($action, 'validation') ?: []; |
|
23 | + $this->functions = $this->getConfigValue($action, 'functions') ?: []; |
|
24 | + $this->defaults = $this->getConfigValue($action, 'defaults') ?: []; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -4,8 +4,6 @@ |
||
4 | 4 | namespace Anavel\Crud\Abstractor\Eloquent\Traits; |
5 | 5 | |
6 | 6 | |
7 | -use Anavel\Crud\Contracts\Abstractor\Field; |
|
8 | - |
|
9 | 7 | trait ModelFields |
10 | 8 | { |
11 | 9 | protected $fieldsPresentation = []; |
@@ -55,7 +55,6 @@ |
||
55 | 55 | public function getSecondaryRelations(); |
56 | 56 | |
57 | 57 | /** |
58 | - * @param Model $relatedModel |
|
59 | 58 | * @return Relation |
60 | 59 | */ |
61 | 60 | public function setRelatedModel(\Illuminate\Database\Eloquent\Model $model); |
@@ -9,6 +9,9 @@ |
||
9 | 9 | |
10 | 10 | trait HandleFiles |
11 | 11 | { |
12 | + /** |
|
13 | + * @param string $groupName |
|
14 | + */ |
|
12 | 15 | protected function handleField(Request $request, $item, array $fields, $currentKey, $groupName, $fieldName) |
13 | 16 | { |
14 | 17 | $modelFolder = $this->slug . DIRECTORY_SEPARATOR; |
@@ -11,18 +11,18 @@ discard block |
||
11 | 11 | { |
12 | 12 | protected function handleField(Request $request, $item, array $fields, $groupName, $fieldName) |
13 | 13 | { |
14 | - $modelFolder = $this->slug . DIRECTORY_SEPARATOR; |
|
15 | - $basePath = base_path(DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR .config('anavel-crud.uploads_path')); |
|
16 | - $modelPath = $basePath . $modelFolder; |
|
14 | + $modelFolder = $this->slug.DIRECTORY_SEPARATOR; |
|
15 | + $basePath = base_path(DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.config('anavel-crud.uploads_path')); |
|
16 | + $modelPath = $basePath.$modelFolder; |
|
17 | 17 | $skip = null; |
18 | 18 | $requestValue = null; |
19 | - if (! empty($fields["{$fieldName}__delete"])) { |
|
19 | + if (!empty($fields["{$fieldName}__delete"])) { |
|
20 | 20 | //We never want to save this field, it doesn't exist in the DB |
21 | 21 | $skip = "{$fieldName}__delete"; |
22 | 22 | |
23 | 23 | |
24 | 24 | //If user wants to delete the existing file |
25 | - if (! empty($request->input("{$groupName}.{$fieldName}__delete"))) { |
|
25 | + if (!empty($request->input("{$groupName}.{$fieldName}__delete"))) { |
|
26 | 26 | $adapter = new Local($basePath); |
27 | 27 | $filesystem = new Filesystem($adapter); |
28 | 28 | if ($filesystem->has($item->$fieldName)) { |
@@ -39,22 +39,22 @@ discard block |
||
39 | 39 | ]; |
40 | 40 | } |
41 | 41 | } |
42 | - if ($request->hasFile($groupName .'.'.$fieldName)) { |
|
43 | - $fileName = uniqid() . '_' .$request->file($groupName .'.'.$fieldName)->getClientOriginalName(); |
|
42 | + if ($request->hasFile($groupName.'.'.$fieldName)) { |
|
43 | + $fileName = uniqid().'_'.$request->file($groupName.'.'.$fieldName)->getClientOriginalName(); |
|
44 | 44 | |
45 | 45 | |
46 | - $request->file($groupName .'.'.$fieldName)->move( |
|
46 | + $request->file($groupName.'.'.$fieldName)->move( |
|
47 | 47 | $modelPath, |
48 | 48 | $fileName |
49 | 49 | ); |
50 | 50 | |
51 | - $requestValue = $modelFolder . $fileName; |
|
52 | - } elseif (! empty($request->file($groupName .'.'.$fieldName)) && ! $request->file($groupName .'.'.$fieldName)->isValid()) { |
|
53 | - throw new \Exception($request->file($groupName .'.'.$fieldName)->getErrorMessage()); |
|
51 | + $requestValue = $modelFolder.$fileName; |
|
52 | + } elseif (!empty($request->file($groupName.'.'.$fieldName)) && !$request->file($groupName.'.'.$fieldName)->isValid()) { |
|
53 | + throw new \Exception($request->file($groupName.'.'.$fieldName)->getErrorMessage()); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | //Avoid losing the existing filename if the user doesn't change it: |
57 | - if (empty($requestValue) && (! empty($item->$fieldName))) { |
|
57 | + if (empty($requestValue) && (!empty($item->$fieldName))) { |
|
58 | 58 | $requestValue = $item->$fieldName; |
59 | 59 | } |
60 | 60 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function persist(array $relationArray = null, Request $request) |
30 | 30 | { |
31 | - if (! empty($relationArray)) { |
|
31 | + if (!empty($relationArray)) { |
|
32 | 32 | $this->eloquentRelation->sync($relationArray[$this->eloquentRelation->getRelated()->getKeyName()]); |
33 | 33 | } |
34 | 34 | } |
@@ -25,6 +25,9 @@ |
||
25 | 25 | $this->formGenerator = $formGenerator; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $methodName |
|
30 | + */ |
|
28 | 31 | private function authorizeMethod(Model $modelAbstractor, $methodName) |
29 | 32 | { |
30 | 33 | if (array_key_exists('authorize', $config = $modelAbstractor->getConfig()) && $config['authorize'] === true) { |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private function customController(Model $modelAbstractor) |
40 | 40 | { |
41 | - if (! $this instanceof CustomController) { //Avoid infinite recursion |
|
42 | - if (array_key_exists('controller', $config = $modelAbstractor->getConfig()) && (! empty($config['controller']))) { |
|
41 | + if (!$this instanceof CustomController) { //Avoid infinite recursion |
|
42 | + if (array_key_exists('controller', $config = $modelAbstractor->getConfig()) && (!empty($config['controller']))) { |
|
43 | 43 | /** @var CustomController $controller */ |
44 | 44 | $controller = App::make($config['controller']); |
45 | 45 | $controller->setAbstractor($modelAbstractor); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $this->authorizeMethod($modelAbstractor, 'adminIndex'); |
64 | 64 | |
65 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
65 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
66 | 66 | return $customController->index($request, $model); |
67 | 67 | } |
68 | 68 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $this->authorizeMethod($modelAbstractor, 'adminCreate'); |
104 | 104 | |
105 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
105 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
106 | 106 | return $customController->create($model); |
107 | 107 | } |
108 | 108 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | $this->authorizeMethod($modelAbstractor, 'adminStore'); |
130 | 130 | |
131 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
131 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
132 | 132 | return $customController->store($request, $model); |
133 | 133 | } |
134 | 134 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $this->authorizeMethod($modelAbstractor, 'adminShow'); |
164 | 164 | |
165 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
165 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
166 | 166 | return $customController->show($model, $id); |
167 | 167 | } |
168 | 168 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | $this->authorizeMethod($modelAbstractor, 'adminEdit'); |
191 | 191 | |
192 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
192 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
193 | 193 | return $customController->edit($model, $id); |
194 | 194 | } |
195 | 195 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | |
220 | 220 | $this->authorizeMethod($modelAbstractor, 'adminUpdate'); |
221 | 221 | |
222 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
222 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
223 | 223 | return $customController->update($request, $model, $id); |
224 | 224 | } |
225 | 225 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | $this->authorizeMethod($modelAbstractor, 'adminDestroy'); |
256 | 256 | |
257 | - if (! empty($customController = $this->customController($modelAbstractor))) { |
|
257 | + if (!empty($customController = $this->customController($modelAbstractor))) { |
|
258 | 258 | return $customController->destroy($request, $model, $id); |
259 | 259 | } |
260 | 260 |