@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function removeFields($fields) |
50 | 50 | { |
51 | - $this->fields = $this->fields->reject(function (Field $field) use ($fields) { |
|
51 | + $this->fields = $this->fields->reject(function(Field $field) use ($fields) { |
|
52 | 52 | return in_array($field->column(), $fields); |
53 | 53 | }); |
54 | 54 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | if (empty($selectedOption)) { |
43 | 43 | $selected = $this->choice('Please choose a role for the user', $selectedOption, null, null, true); |
44 | 44 | |
45 | - $roles = $roles->filter(function ($role) use ($selected) { |
|
45 | + $roles = $roles->filter(function($role) use ($selected) { |
|
46 | 46 | return in_array($role->name, $selected); |
47 | 47 | }); |
48 | 48 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | */ |
336 | 336 | public function field($name) |
337 | 337 | { |
338 | - return $this->fields()->first(function (Field $field) use ($name) { |
|
338 | + return $this->fields()->first(function(Field $field) use ($name) { |
|
339 | 339 | return $field->column() === $name; |
340 | 340 | }); |
341 | 341 | } |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | |
535 | 535 | $this->form->getLayout()->removeReservedFields($reservedColumns); |
536 | 536 | |
537 | - $this->fields = $this->fields()->reject(function (Field $field) use ($reservedColumns) { |
|
537 | + $this->fields = $this->fields()->reject(function(Field $field) use ($reservedColumns) { |
|
538 | 538 | return in_array($field->column(), $reservedColumns, true); |
539 | 539 | }); |
540 | 540 | } |
@@ -475,7 +475,7 @@ |
||
475 | 475 | $relation = substr($this->column, 0, strrpos($this->column, '.')); |
476 | 476 | $args[0] = last(explode('.', $this->column)); |
477 | 477 | |
478 | - return ['whereHas' => [$relation, function ($relation) use ($args) { |
|
478 | + return ['whereHas' => [$relation, function($relation) use ($args) { |
|
479 | 479 | call_user_func_array([$relation, $this->query], $args); |
480 | 480 | }]]; |
481 | 481 | } |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | return $content |
27 | 27 | ->title(trans('admin.menu')) |
28 | 28 | ->description(trans('admin.list')) |
29 | - ->row(function (Row $row) { |
|
29 | + ->row(function(Row $row) { |
|
30 | 30 | $row->column(6, $this->treeView()->render()); |
31 | 31 | |
32 | - $row->column(6, function (Column $column) { |
|
32 | + $row->column(6, function(Column $column) { |
|
33 | 33 | $form = new \Encore\Admin\Widgets\Form(); |
34 | 34 | $form->action(admin_url('auth/menu')); |
35 | 35 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $tree->disableCreate(); |
77 | 77 | |
78 | - $tree->branch(function ($branch) { |
|
78 | + $tree->branch(function($branch) { |
|
79 | 79 | $payload = "<i class='fa {$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
80 | 80 | |
81 | 81 | if (!isset($branch['children'])) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | // for create or update |
156 | 156 | if ($this->pathColumn) { |
157 | - $targets = array_map(function ($target) { |
|
157 | + $targets = array_map(function($target) { |
|
158 | 158 | return [$this->pathColumn => $target]; |
159 | 159 | }, $targets); |
160 | 160 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | { |
186 | 186 | $this->name = $this->getStoreName($file); |
187 | 187 | |
188 | - return tap($this->upload($file), function () { |
|
188 | + return tap($this->upload($file), function() { |
|
189 | 189 | $this->name = null; |
190 | 190 | }); |
191 | 191 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | ]; |
30 | 30 | |
31 | 31 | try { |
32 | - DB::transaction(function () use ($model) { |
|
32 | + DB::transaction(function() use ($model) { |
|
33 | 33 | $model->delete(); |
34 | 34 | }); |
35 | 35 | } catch (\Exception $exception) { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | $this->overwriteExistingField($name); |
228 | 228 | |
229 | - return tap($field, function ($field) { |
|
229 | + return tap($field, function($field) { |
|
230 | 230 | $this->fields->push($field); |
231 | 231 | }); |
232 | 232 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | $this->overwriteExistingRelation($name); |
250 | 250 | |
251 | - return tap($relation, function ($relation) { |
|
251 | + return tap($relation, function($relation) { |
|
252 | 252 | $this->relations->push($relation); |
253 | 253 | }); |
254 | 254 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | $this->fields = $this->fields->filter( |
268 | - function (Field $field) use ($name) { |
|
268 | + function(Field $field) use ($name) { |
|
269 | 269 | return $field->getName() != $name; |
270 | 270 | } |
271 | 271 | ); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | } |
284 | 284 | |
285 | 285 | $this->relations = $this->relations->filter( |
286 | - function (Relation $relation) use ($name) { |
|
286 | + function(Relation $relation) use ($name) { |
|
287 | 287 | return $relation->getName() != $name; |
288 | 288 | } |
289 | 289 | ); |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | */ |
341 | 341 | public function setWidth($fieldWidth = 8, $labelWidth = 2) |
342 | 342 | { |
343 | - collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
343 | + collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) { |
|
344 | 344 | $field->setWidth($fieldWidth, $labelWidth); |
345 | 345 | }); |
346 | 346 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->disablePagination(); |
87 | 87 | } |
88 | 88 | |
89 | - $this->tools(function (Tools $tools) { |
|
89 | + $this->tools(function(Tools $tools) { |
|
90 | 90 | $tools->append(new Grid\Selectable\BrowserBtn()); |
91 | 91 | }); |
92 | 92 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $hide = $hide ? 'hide' : ''; |
99 | 99 | $key = $this->key; |
100 | 100 | |
101 | - $this->column('__remove__', ' ')->display(function () use ($hide, $key) { |
|
101 | + $this->column('__remove__', ' ')->display(function() use ($hide, $key) { |
|
102 | 102 | return <<<BTN |
103 | 103 | <a href="javascript:void(0);" class="grid-row-remove {$hide}" data-key="{$this->getAttribute($key)}"> |
104 | 104 | <i class="fa fa-trash"></i> |