@@ -96,7 +96,7 @@ |
||
96 | 96 | { |
97 | 97 | static::treeBoot(); |
98 | 98 | |
99 | - static::deleting(function ($model) { |
|
99 | + static::deleting(function($model) { |
|
100 | 100 | $model->roles()->detach(); |
101 | 101 | }); |
102 | 102 | } |
@@ -100,7 +100,7 @@ |
||
100 | 100 | { |
101 | 101 | parent::boot(); |
102 | 102 | |
103 | - static::deleting(function ($model) { |
|
103 | + static::deleting(function($model) { |
|
104 | 104 | $model->administrators()->detach(); |
105 | 105 | |
106 | 106 | $model->permissions()->detach(); |
@@ -311,10 +311,10 @@ |
||
311 | 311 | 'middleware' => config('admin.route.middleware'), |
312 | 312 | ]; |
313 | 313 | |
314 | - app('router')->group($attributes, function ($router) { |
|
314 | + app('router')->group($attributes, function($router) { |
|
315 | 315 | |
316 | 316 | /* @var \Illuminate\Support\Facades\Route $router */ |
317 | - $router->namespace('\Encore\Admin\Controllers')->group(function ($router) { |
|
317 | + $router->namespace('\Encore\Admin\Controllers')->group(function($router) { |
|
318 | 318 | |
319 | 319 | /* @var \Illuminate\Routing\Router $router */ |
320 | 320 | $router->resource('auth/users', 'UserController')->names('admin.auth.users'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | askForUserName: |
33 | 33 | $username = $this->askWithCompletion('Please enter a username who needs to reset his password', $users->pluck('username')->toArray()); |
34 | 34 | |
35 | - $user = $users->first(function ($user) use ($username) { |
|
35 | + $user = $users->first(function($user) use ($username) { |
|
36 | 36 | return $user->username == $username; |
37 | 37 | }); |
38 | 38 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | protected function minifyCSS() |
95 | 95 | { |
96 | 96 | $css = collect(array_merge(Admin::$css, Admin::baseCss())) |
97 | - ->unique()->map(function ($css) { |
|
97 | + ->unique()->map(function($css) { |
|
98 | 98 | if (url()->isValidUrl($css)) { |
99 | 99 | $this->assets['css'][] = $css; |
100 | 100 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | protected function minifyJS() |
125 | 125 | { |
126 | 126 | $js = collect(array_merge(Admin::$js, Admin::baseJs())) |
127 | - ->unique()->map(function ($js) { |
|
127 | + ->unique()->map(function($js) { |
|
128 | 128 | if (url()->isValidUrl($js)) { |
129 | 129 | $this->assets['js'][] = $js; |
130 | 130 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | protected function generateManifest() |
155 | 155 | { |
156 | - $min = collect(Admin::$min)->mapWithKeys(function ($path, $type) { |
|
156 | + $min = collect(Admin::$min)->mapWithKeys(function($path, $type) { |
|
157 | 157 | return [$type => sprintf('%s?id=%s', $path, md5(uniqid()))]; |
158 | 158 | }); |
159 | 159 |
@@ -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 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | $fields = \DB::getSchemaBuilder()->getColumnListing($table); |
90 | 90 | $fields = array_diff($fields, $exceptFields); |
91 | 91 | |
92 | - $array = \DB::table($table)->get($fields)->map(function ($item) { |
|
92 | + $array = \DB::table($table)->get($fields)->map(function($item) { |
|
93 | 93 | return (array) $item; |
94 | 94 | })->all(); |
95 | 95 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | protected function listAdminCommands() |
58 | 58 | { |
59 | - $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) { |
|
59 | + $commands = collect(Artisan::all())->mapWithKeys(function($command, $key) { |
|
60 | 60 | if (Str::startsWith($key, 'admin:')) { |
61 | 61 | return [$key => $command]; |
62 | 62 | } |
@@ -72,8 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | $columns = explode(',', request(ColumnSelector::SELECT_COLUMN_NAME)); |
74 | 74 | |
75 | - return array_filter($columns) ?: |
|
76 | - array_values(array_diff($this->columnNames, $this->hiddenColumns)); |
|
75 | + return array_filter($columns) ?: array_values(array_diff($this->columnNames, $this->hiddenColumns)); |
|
77 | 76 | } |
78 | 77 | |
79 | 78 | /** |
@@ -91,7 +90,7 @@ discard block |
||
91 | 90 | |
92 | 91 | array_push($visible, Grid\Column::SELECT_COLUMN_NAME, Grid\Column::ACTION_COLUMN_NAME); |
93 | 92 | |
94 | - return $this->columns->filter(function (Grid\Column $column) use ($visible) { |
|
93 | + return $this->columns->filter(function(Grid\Column $column) use ($visible) { |
|
95 | 94 | return in_array($column->getName(), $visible); |
96 | 95 | }); |
97 | 96 | } |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | |
112 | 111 | array_push($visible, Grid\Column::SELECT_COLUMN_NAME, Grid\Column::ACTION_COLUMN_NAME); |
113 | 112 | |
114 | - return collect($this->columnNames)->filter(function ($column) use ($visible) { |
|
113 | + return collect($this->columnNames)->filter(function($column) use ($visible) { |
|
115 | 114 | return in_array($column, $visible); |
116 | 115 | })->toArray(); |
117 | 116 | } |