@@ -155,7 +155,7 @@ |
||
155 | 155 | { |
156 | 156 | parent::boot(); |
157 | 157 | |
158 | - static::deleting(function ($model) { |
|
158 | + static::deleting(function($model) { |
|
159 | 159 | $model->roles()->detach(); |
160 | 160 | |
161 | 161 | $model->permissions()->detach(); |
@@ -78,7 +78,7 @@ |
||
78 | 78 | { |
79 | 79 | static::treeBoot(); |
80 | 80 | |
81 | - static::deleting(function ($model) { |
|
81 | + static::deleting(function($model) { |
|
82 | 82 | $model->roles()->detach(); |
83 | 83 | }); |
84 | 84 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function condition() |
57 | 57 | { |
58 | - return $this->queries->map(function ($query) { |
|
58 | + return $this->queries->map(function($query) { |
|
59 | 59 | return [$query['method'] => $query['arguments']]; |
60 | 60 | })->toArray(); |
61 | 61 | } |
@@ -288,7 +288,7 @@ |
||
288 | 288 | return ''; |
289 | 289 | } |
290 | 290 | |
291 | - return $tools->map(function ($tool) { |
|
291 | + return $tools->map(function($tool) { |
|
292 | 292 | if ($tool instanceof Renderable) { |
293 | 293 | return $tool->render(); |
294 | 294 | } |
@@ -275,7 +275,7 @@ |
||
275 | 275 | */ |
276 | 276 | protected function renderCustomTools($tools) |
277 | 277 | { |
278 | - return $tools->map(function ($tool) { |
|
278 | + return $tools->map(function($tool) { |
|
279 | 279 | if ($tool instanceof Renderable) { |
280 | 280 | return $tool->render(); |
281 | 281 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | $form = $this->settingForm(); |
85 | 85 | $form->tools( |
86 | - function (Form\Tools $tools) { |
|
86 | + function(Form\Tools $tools) { |
|
87 | 87 | $tools->disableList(); |
88 | 88 | } |
89 | 89 | ); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $form->image('avatar', trans('admin.avatar')); |
119 | 119 | $form->password('password', trans('admin.password'))->rules('confirmed|required'); |
120 | 120 | $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required') |
121 | - ->default(function ($form) { |
|
121 | + ->default(function($form) { |
|
122 | 122 | return $form->model()->password; |
123 | 123 | }); |
124 | 124 | |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | |
127 | 127 | $form->ignore(['password_confirmation']); |
128 | 128 | |
129 | - $form->saving(function (Form $form) { |
|
129 | + $form->saving(function(Form $form) { |
|
130 | 130 | if ($form->password && $form->model()->password != $form->password) { |
131 | 131 | $form->password = bcrypt($form->password); |
132 | 132 | } |
133 | 133 | }); |
134 | 134 | |
135 | - $form->saved(function () { |
|
135 | + $form->saved(function() { |
|
136 | 136 | admin_toastr(trans('admin.update_succeeded')); |
137 | 137 | |
138 | 138 | return redirect(admin_base_path('auth/setting')); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | /** @var array $selected */ |
39 | 39 | $selected = $this->choice('Please choose a role for the user', $roles->pluck('name')->toArray(), null, null, true); |
40 | 40 | |
41 | - $roles = $roles->filter(function ($role) use ($selected) { |
|
41 | + $roles = $roles->filter(function($role) use ($selected) { |
|
42 | 42 | return in_array($role->name, $selected); |
43 | 43 | }); |
44 | 44 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | askForUserName: |
32 | 32 | $username = $this->askWithCompletion('Please enter a username who needs to reset his password', $users->pluck('username')->toArray()); |
33 | 33 | |
34 | - $user = $users->first(function ($user) use ($username) { |
|
34 | + $user = $users->first(function($user) use ($username) { |
|
35 | 35 | return $user->username == $username; |
36 | 36 | }); |
37 | 37 |
@@ -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 | } |