@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | "$this->viewPrefix.index", |
| 356 | 356 | "twill::$this->moduleName.index", |
| 357 | 357 | "twill::layouts.listing", |
| 358 | - ])->first(function ($view) { |
|
| 358 | + ])->first(function($view) { |
|
| 359 | 359 | return View::exists($view); |
| 360 | 360 | }); |
| 361 | 361 | |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | "$this->viewPrefix.form", |
| 461 | 461 | "twill::$this->moduleName.form", |
| 462 | 462 | "twill::layouts.form", |
| 463 | - ])->first(function ($view) { |
|
| 463 | + ])->first(function($view) { |
|
| 464 | 464 | return View::exists($view); |
| 465 | 465 | }); |
| 466 | 466 | |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | "$this->viewPrefix.form", |
| 492 | 492 | "twill::$this->moduleName.form", |
| 493 | 493 | "twill::layouts.form", |
| 494 | - ])->first(function ($view) { |
|
| 494 | + ])->first(function($view) { |
|
| 495 | 495 | return View::exists($view); |
| 496 | 496 | }); |
| 497 | 497 | |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | "$this->viewPrefix.form", |
| 616 | 616 | "twill::$this->moduleName.form", |
| 617 | 617 | "twill::layouts.form", |
| 618 | - ])->first(function ($view) { |
|
| 618 | + ])->first(function($view) { |
|
| 619 | 619 | return View::exists($view); |
| 620 | 620 | }); |
| 621 | 621 | |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | $query = $this->request->input('q'); |
| 864 | 864 | $tags = $this->repository->getTags($query); |
| 865 | 865 | |
| 866 | - return Response::json(['items' => $tags->map(function ($tag) { |
|
| 866 | + return Response::json(['items' => $tags->map(function($tag) { |
|
| 867 | 867 | return $tag->name; |
| 868 | 868 | })], 200); |
| 869 | 869 | } |
@@ -951,8 +951,8 @@ discard block |
||
| 951 | 951 | protected function getIndexTableData($items) |
| 952 | 952 | { |
| 953 | 953 | $translated = $this->moduleHas('translations'); |
| 954 | - return $items->map(function ($item) use ($translated) { |
|
| 955 | - $columnsData = Collection::make($this->indexColumns)->mapWithKeys(function ($column) use ($item) { |
|
| 954 | + return $items->map(function($item) use ($translated) { |
|
| 955 | + $columnsData = Collection::make($this->indexColumns)->mapWithKeys(function($column) use ($item) { |
|
| 956 | 956 | return $this->getItemColumnData($item, $column); |
| 957 | 957 | })->toArray(); |
| 958 | 958 | |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | 'feature', |
| 1214 | 1214 | 'bulkFeature', |
| 1215 | 1215 | 'bulkDelete', |
| 1216 | - ])->mapWithKeys(function ($endpoint) { |
|
| 1216 | + ])->mapWithKeys(function($endpoint) { |
|
| 1217 | 1217 | return [ |
| 1218 | 1218 | $endpoint . 'Url' => $this->getIndexOption($endpoint) ? moduleRoute( |
| 1219 | 1219 | $this->moduleName, |
@@ -1231,7 +1231,7 @@ discard block |
||
| 1231 | 1231 | */ |
| 1232 | 1232 | protected function getIndexOption($option) |
| 1233 | 1233 | { |
| 1234 | - return once(function () use ($option) { |
|
| 1234 | + return once(function() use ($option) { |
|
| 1235 | 1235 | $customOptionNamesMapping = [ |
| 1236 | 1236 | 'store' => 'create', |
| 1237 | 1237 | ]; |
@@ -1288,8 +1288,8 @@ discard block |
||
| 1288 | 1288 | { |
| 1289 | 1289 | $withImage = $this->moduleHas('medias'); |
| 1290 | 1290 | |
| 1291 | - return $items->map(function ($item) use ($withImage) { |
|
| 1292 | - $columnsData = Collection::make($this->browserColumns)->mapWithKeys(function ($column) use ($item) { |
|
| 1291 | + return $items->map(function($item) use ($withImage) { |
|
| 1292 | + $columnsData = Collection::make($this->browserColumns)->mapWithKeys(function($column) use ($item) { |
|
| 1293 | 1293 | return $this->getItemColumnData($item, $column); |
| 1294 | 1294 | })->toArray(); |
| 1295 | 1295 | |
@@ -1355,7 +1355,7 @@ discard block |
||
| 1355 | 1355 | $fieldSplitted = explode('|', $field); |
| 1356 | 1356 | if (count($fieldSplitted) > 1) { |
| 1357 | 1357 | $requestValue = $requestFilters[$key]; |
| 1358 | - Collection::make($fieldSplitted)->each(function ($scopeKey) use (&$scope, $requestValue) { |
|
| 1358 | + Collection::make($fieldSplitted)->each(function($scopeKey) use (&$scope, $requestValue) { |
|
| 1359 | 1359 | $scope[$scopeKey] = $requestValue; |
| 1360 | 1360 | }); |
| 1361 | 1361 | } else { |
@@ -1531,11 +1531,11 @@ discard block |
||
| 1531 | 1531 | */ |
| 1532 | 1532 | protected function validateFormRequest() |
| 1533 | 1533 | { |
| 1534 | - $unauthorizedFields = Collection::make($this->fieldsPermissions)->filter(function ($permission, $field) { |
|
| 1534 | + $unauthorizedFields = Collection::make($this->fieldsPermissions)->filter(function($permission, $field) { |
|
| 1535 | 1535 | return Auth::guard('twill_users')->user()->cannot($permission); |
| 1536 | 1536 | })->keys(); |
| 1537 | 1537 | |
| 1538 | - $unauthorizedFields->each(function ($field) { |
|
| 1538 | + $unauthorizedFields->each(function($field) { |
|
| 1539 | 1539 | $this->request->offsetUnset($field); |
| 1540 | 1540 | }); |
| 1541 | 1541 | |
@@ -1778,7 +1778,7 @@ discard block |
||
| 1778 | 1778 | */ |
| 1779 | 1779 | public function getRepeaterList() |
| 1780 | 1780 | { |
| 1781 | - return app(BlockCollection::class)->getRepeaterList()->mapWithKeys(function ($repeater) { |
|
| 1781 | + return app(BlockCollection::class)->getRepeaterList()->mapWithKeys(function($repeater) { |
|
| 1782 | 1782 | return [$repeater['name'] => $repeater]; |
| 1783 | 1783 | }); |
| 1784 | 1784 | } |