@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $this->value = array_get($inputs, $this->column); |
56 | 56 | |
57 | - $value = array_filter($this->value, function ($val) { |
|
57 | + $value = array_filter($this->value, function($val) { |
|
58 | 58 | return $val !== ''; |
59 | 59 | }); |
60 | 60 |
@@ -158,7 +158,7 @@ |
||
158 | 158 | |
159 | 159 | list($relation, $args[0]) = explode('.', $this->column); |
160 | 160 | |
161 | - return ['whereHas' => [$relation, function ($relation) use ($args) { |
|
161 | + return ['whereHas' => [$relation, function($relation) use ($args) { |
|
162 | 162 | call_user_func_array([$relation, $this->query], $args); |
163 | 163 | }]]; |
164 | 164 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | public function style($style) |
135 | 135 | { |
136 | 136 | if (is_array($style)) { |
137 | - $style = implode('', array_map(function ($key, $val) { |
|
137 | + $style = implode('', array_map(function($key, $val) { |
|
138 | 138 | return "$key:$val"; |
139 | 139 | }, array_keys($style), array_values($style))); |
140 | 140 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return $this->style([$styles]); |
65 | 65 | } |
66 | 66 | |
67 | - $styles = array_map(function ($style) { |
|
67 | + $styles = array_map(function($style) { |
|
68 | 68 | return 'box-'.$style; |
69 | 69 | }, $styles); |
70 | 70 |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->setSort(); |
195 | 195 | $this->setPaginate(); |
196 | 196 | |
197 | - $this->queries->unique()->each(function ($query) { |
|
197 | + $this->queries->unique()->each(function($query) { |
|
198 | 198 | $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']); |
199 | 199 | }); |
200 | 200 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | { |
219 | 219 | $paginate = $this->findQueryByMethod('paginate'); |
220 | 220 | |
221 | - $this->queries = $this->queries->reject(function ($query) { |
|
221 | + $this->queries = $this->queries->reject(function($query) { |
|
222 | 222 | return $query['method'] == 'paginate'; |
223 | 223 | }); |
224 | 224 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | protected function findQueryByMethod($method) |
270 | 270 | { |
271 | - return $this->queries->first(function ($query) use ($method) { |
|
271 | + return $this->queries->first(function($query) use ($method) { |
|
272 | 272 | return $query['method'] == $method; |
273 | 273 | }); |
274 | 274 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | { |
314 | 314 | list($relationName, $relationColumn) = explode('.', $column); |
315 | 315 | |
316 | - if ($this->queries->contains(function ($query) use ($relationName) { |
|
316 | + if ($this->queries->contains(function($query) use ($relationName) { |
|
317 | 317 | return $query['method'] == 'with' && in_array($relationName, $query['arguments']); |
318 | 318 | })) { |
319 | 319 | $relation = $this->model->$relationName(); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function resetOrderBy() |
344 | 344 | { |
345 | - $this->queries = $this->queries->reject(function ($query) { |
|
345 | + $this->queries = $this->queries->reject(function($query) { |
|
346 | 346 | return $query['method'] == 'orderBy'; |
347 | 347 | }); |
348 | 348 | } |
@@ -115,7 +115,7 @@ |
||
115 | 115 | { |
116 | 116 | $inputs = array_dot(Input::all()); |
117 | 117 | |
118 | - $inputs = array_filter($inputs, function ($input) { |
|
118 | + $inputs = array_filter($inputs, function($input) { |
|
119 | 119 | return $input !== '' && !is_null($input); |
120 | 120 | }); |
121 | 121 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | { |
68 | 68 | Admin::script($this->script()); |
69 | 69 | |
70 | - $options = $this->getOptions()->map(function ($option) { |
|
70 | + $options = $this->getOptions()->map(function($option) { |
|
71 | 71 | $selected = ($option == $this->perPage) ? 'selected' : ''; |
72 | 72 | $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]); |
73 | 73 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | 'total' => $this->paginator->total(), |
73 | 73 | ]; |
74 | 74 | |
75 | - $parameters = collect($parameters)->flatMap(function ($parameter, $key) { |
|
75 | + $parameters = collect($parameters)->flatMap(function($parameter, $key) { |
|
76 | 76 | return [$key => "<b>$parameter</b>"]; |
77 | 77 | }); |
78 | 78 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function disableRefreshButton() |
86 | 86 | { |
87 | - $this->tools = $this->tools->reject(function ($tool) { |
|
87 | + $this->tools = $this->tools->reject(function($tool) { |
|
88 | 88 | return $tool instanceof RefreshButton; |
89 | 89 | }); |
90 | 90 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function disableBatchActions() |
98 | 98 | { |
99 | - $this->tools = $this->tools->reject(function ($tool) { |
|
99 | + $this->tools = $this->tools->reject(function($tool) { |
|
100 | 100 | return $tool instanceof BatchActions; |
101 | 101 | }); |
102 | 102 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function batch(\Closure $closure) |
108 | 108 | { |
109 | - call_user_func($closure, $this->tools->first(function ($tool) { |
|
109 | + call_user_func($closure, $this->tools->first(function($tool) { |
|
110 | 110 | return $tool instanceof BatchActions; |
111 | 111 | })); |
112 | 112 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function render() |
120 | 120 | { |
121 | - return $this->tools->map(function ($tool) { |
|
121 | + return $this->tools->map(function($tool) { |
|
122 | 122 | if ($tool instanceof AbstractTool) { |
123 | 123 | return $tool->setGrid($this->grid)->render(); |
124 | 124 | } |