@@ -169,7 +169,7 @@ |
||
| 169 | 169 | |
| 170 | 170 | $action = $size[2] ?? 'resize'; |
| 171 | 171 | // Resize image with aspect ratio |
| 172 | - $image->$action($size[0], $size[1], function (Constraint $constraint) { |
|
| 172 | + $image->$action($size[0], $size[1], function(Constraint $constraint) { |
|
| 173 | 173 | $constraint->aspectRatio(); |
| 174 | 174 | })->resizeCanvas($size[0], $size[1], 'center', false, '#ffffff'); |
| 175 | 175 | |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function render() |
| 89 | 89 | { |
| 90 | - $columns = $this->getVisibleColumns()->map(function (Column $column) { |
|
| 90 | + $columns = $this->getVisibleColumns()->map(function(Column $column) { |
|
| 91 | 91 | $name = $column->getName(); |
| 92 | 92 | |
| 93 | 93 | $total = ''; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | $this->grid->setView($this->view); |
| 80 | 80 | |
| 81 | - return function (Grid $grid) { |
|
| 81 | + return function(Grid $grid) { |
|
| 82 | 82 | if ($this->head > 0) { |
| 83 | 83 | $this->left = $grid->visibleColumns()->slice(0, $this->head); |
| 84 | 84 | } |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $column = new Column($column, $label); |
| 358 | 358 | $column->setGrid($this); |
| 359 | 359 | |
| 360 | - return tap($column, function ($value) { |
|
| 360 | + return tap($column, function($value) { |
|
| 361 | 361 | $this->columns->push($value); |
| 362 | 362 | }); |
| 363 | 363 | } |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | $column = new Column($column, $label); |
| 422 | 422 | $column->setGrid($this); |
| 423 | 423 | |
| 424 | - return tap($column, function ($value) { |
|
| 424 | + return tap($column, function($value) { |
|
| 425 | 425 | $this->columns->prepend($value); |
| 426 | 426 | }); |
| 427 | 427 | } |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | |
| 555 | 555 | $data = $collection->toArray(); |
| 556 | 556 | |
| 557 | - $this->columns->map(function (Column $column) use (&$data) { |
|
| 557 | + $this->columns->map(function(Column $column) use (&$data) { |
|
| 558 | 558 | $data = $column->fill($data); |
| 559 | 559 | |
| 560 | 560 | $this->columnNames[] = $column->getName(); |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | */ |
| 575 | 575 | protected function buildRows(array $data) |
| 576 | 576 | { |
| 577 | - $this->rows = collect($data)->map(function ($model, $number) { |
|
| 577 | + $this->rows = collect($data)->map(function($model, $number) { |
|
| 578 | 578 | return new Row($number, $model, $this->keyName); |
| 579 | 579 | }); |
| 580 | 580 | |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function batchActions(Closure $closure) |
| 90 | 90 | { |
| 91 | - $this->tools(function (Grid\Tools $tools) use ($closure) { |
|
| 91 | + $this->tools(function(Grid\Tools $tools) use ($closure) { |
|
| 92 | 92 | $tools->batch($closure); |
| 93 | 93 | }); |
| 94 | 94 | |
@@ -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 = \request()->fullUrlWithQuery([$this->perPageName => $option]); |
| 73 | 73 | |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | return []; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $selected = array_filter($selected, function ($value) { |
|
| 109 | + $selected = array_filter($selected, function($value) { |
|
| 110 | 110 | return !is_null($value); |
| 111 | 111 | }); |
| 112 | 112 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | call_user_func($closure, $this->selector); |
| 28 | 28 | |
| 29 | - $this->header(function () { |
|
| 29 | + $this->header(function() { |
|
| 30 | 30 | return $this->renderSelector(); |
| 31 | 31 | }); |
| 32 | 32 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $active = Selector::parseSelected(); |
| 48 | 48 | |
| 49 | - $this->selector->getSelectors()->each(function ($selector, $column) use ($active) { |
|
| 49 | + $this->selector->getSelectors()->each(function($selector, $column) use ($active) { |
|
| 50 | 50 | if (!array_key_exists($column, $active)) { |
| 51 | 51 | return; |
| 52 | 52 | } |
@@ -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'])) { |