@@ -41,11 +41,11 @@ |
||
41 | 41 | $columnRelation = explode('.', $column); |
42 | 42 | |
43 | 43 | if ($or) { |
44 | - $query->orWhereHas($columnRelation[0], function ($subquery) use ($columnRelation) { |
|
44 | + $query->orWhereHas($columnRelation[0], function($subquery) use ($columnRelation) { |
|
45 | 45 | $subquery->where($columnRelation[1], 'LIKE', '%'.$this->queryString.'%'); |
46 | 46 | }); |
47 | 47 | } else { |
48 | - $query->whereHas($columnRelation[0], function ($subquery) use ($columnRelation) { |
|
48 | + $query->whereHas($columnRelation[0], function($subquery) use ($columnRelation) { |
|
49 | 49 | $subquery->where($columnRelation[1], 'LIKE', '%'.$this->queryString.'%'); |
50 | 50 | }); |
51 | 51 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $modelAbstractor = $modelFactory->getByName($modelSlug); |
24 | 24 | $config = $modelAbstractor->getConfig(); |
25 | 25 | |
26 | - if (! array_key_exists('authorize', $config) || ( $config['authorize'] === true && Gate::allows('adminIndex', $modelAbstractor->getInstance()) || $config['authorize'] === false )) { |
|
26 | + if (!array_key_exists('authorize', $config) || ($config['authorize'] === true && Gate::allows('adminIndex', $modelAbstractor->getInstance()) || $config['authorize'] === false)) { |
|
27 | 27 | return new RedirectResponse(route('anavel-crud.model.index', $modelSlug)); |
28 | 28 | } |
29 | 29 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getDisplay() |
85 | 85 | { |
86 | - if (! empty($this->config['display'])) { |
|
86 | + if (!empty($this->config['display'])) { |
|
87 | 87 | return $this->config['display']; |
88 | 88 | } |
89 | 89 | return null; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | public function getPresentation() |
93 | 93 | { |
94 | - return $this->presentation ? : ucfirst(str_replace('_', ' ', $this->name)); |
|
94 | + return $this->presentation ?: ucfirst(str_replace('_', ' ', $this->name)); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public function getType() |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } catch (\Exception $e) { |
62 | 62 | continue; |
63 | 63 | } |
64 | - $menuItems[$modelName]['isActive'] = $item['isActive']; |
|
64 | + $menuItems[$modelName]['isActive'] = $item['isActive']; |
|
65 | 65 | $menuItems[$modelName]['name'] = $item['name']; |
66 | 66 | $menuItems[$modelName]['items'][] = $item; |
67 | 67 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | //Sort alphabetically de menu items |
70 | 70 | usort($menuItems, function($itemA, $itemB) |
71 | 71 | { |
72 | - return strcmp($itemA['name'],$itemB['name']); |
|
72 | + return strcmp($itemA['name'], $itemB['name']); |
|
73 | 73 | }); |
74 | 74 | return $menuItems; |
75 | 75 | } |