@@ -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 | |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | { |
72 | 72 | $menuModel = config('admin.database.menu_model'); |
73 | 73 | |
74 | - return $menuModel::tree(function (Tree $tree) { |
|
74 | + return $menuModel::tree(function(Tree $tree) { |
|
75 | 75 | $tree->disableCreate(); |
76 | 76 | |
77 | - $tree->branch(function ($branch) { |
|
77 | + $tree->branch(function($branch) { |
|
78 | 78 | $payload = "<i class='fa {$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
79 | 79 | |
80 | 80 | if (!isset($branch['children'])) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $form = $this->settingForm(); |
97 | 97 | $form->tools( |
98 | - function (Form\Tools $tools) { |
|
98 | + function(Form\Tools $tools) { |
|
99 | 99 | $tools->disableList(); |
100 | 100 | $tools->disableDelete(); |
101 | 101 | $tools->disableView(); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $form->image('avatar', trans('admin.avatar')); |
134 | 134 | $form->password('password', trans('admin.password'))->rules('confirmed|required'); |
135 | 135 | $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required') |
136 | - ->default(function ($form) { |
|
136 | + ->default(function($form) { |
|
137 | 137 | return $form->model()->password; |
138 | 138 | }); |
139 | 139 | |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | |
142 | 142 | $form->ignore(['password_confirmation']); |
143 | 143 | |
144 | - $form->saving(function (Form $form) { |
|
144 | + $form->saving(function(Form $form) { |
|
145 | 145 | if ($form->password && $form->model()->password != $form->password) { |
146 | 146 | $form->password = bcrypt($form->password); |
147 | 147 | } |
148 | 148 | }); |
149 | 149 | |
150 | - $form->saved(function () { |
|
150 | + $form->saved(function() { |
|
151 | 151 | admin_toastr(trans('admin.update_succeeded')); |
152 | 152 | |
153 | 153 | return redirect(admin_url('auth/setting')); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $this->value = $this->value->toArray(); |
14 | 14 | } |
15 | 15 | |
16 | - return collect((array) $this->value)->map(function ($item) use ($style) { |
|
16 | + return collect((array) $this->value)->map(function($item) use ($style) { |
|
17 | 17 | if (is_array($style)) { |
18 | 18 | if (is_string($this->getColumn()->getOriginal()) || is_int($this->getColumn()->getOriginal())) { |
19 | 19 | $style = Arr::get($style, $this->getColumn()->getOriginal(), 'success'); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function removeFilterByID($id) |
288 | 288 | { |
289 | - $this->filters = array_filter($this->filters, function (AbstractFilter $filter) use ($id) { |
|
289 | + $this->filters = array_filter($this->filters, function(AbstractFilter $filter) use ($id) { |
|
290 | 290 | return $filter->getId() != $id; |
291 | 291 | }); |
292 | 292 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | { |
301 | 301 | $inputs = Arr::dot(Input::all()); |
302 | 302 | |
303 | - $inputs = array_filter($inputs, function ($input) { |
|
303 | + $inputs = array_filter($inputs, function($input) { |
|
304 | 304 | return $input !== '' && !is_null($input); |
305 | 305 | }); |
306 | 306 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | } |
329 | 329 | } |
330 | 330 | |
331 | - return tap(array_filter($conditions), function ($conditions) { |
|
331 | + return tap(array_filter($conditions), function($conditions) { |
|
332 | 332 | if (!empty($conditions)) { |
333 | 333 | $this->expand(); |
334 | 334 | } |
@@ -346,9 +346,9 @@ discard block |
||
346 | 346 | return $inputs; |
347 | 347 | } |
348 | 348 | |
349 | - $inputs = collect($inputs)->filter(function ($input, $key) { |
|
349 | + $inputs = collect($inputs)->filter(function($input, $key) { |
|
350 | 350 | return Str::startsWith($key, "{$this->name}_"); |
351 | - })->mapWithKeys(function ($val, $key) { |
|
351 | + })->mapWithKeys(function($val, $key) { |
|
352 | 352 | $key = str_replace("{$this->name}_", '', $key); |
353 | 353 | |
354 | 354 | return [$key => $val]; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | public function scope($key, $label = '') |
420 | 420 | { |
421 | - return tap(new Scope($key, $label), function (Scope $scope) { |
|
421 | + return tap(new Scope($key, $label), function(Scope $scope) { |
|
422 | 422 | return $this->scopes->push($scope); |
423 | 423 | }); |
424 | 424 | } |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | { |
443 | 443 | $key = request(Scope::QUERY_NAME); |
444 | 444 | |
445 | - return $this->scopes->first(function ($scope) use ($key) { |
|
445 | + return $this->scopes->first(function($scope) use ($key) { |
|
446 | 446 | return $scope->key == $key; |
447 | 447 | }); |
448 | 448 | } |
@@ -567,9 +567,9 @@ discard block |
||
567 | 567 | |
568 | 568 | $columns->push($pageKey); |
569 | 569 | |
570 | - $groupNames = collect($this->filters)->filter(function ($filter) { |
|
570 | + $groupNames = collect($this->filters)->filter(function($filter) { |
|
571 | 571 | return $filter instanceof Filter\Group; |
572 | - })->map(function (AbstractFilter $filter) { |
|
572 | + })->map(function(AbstractFilter $filter) { |
|
573 | 573 | return "{$filter->getId()}_group"; |
574 | 574 | }); |
575 | 575 |