@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ]; |
40 | 40 | |
41 | 41 | if (is_dir($directory = app_path('Admin'))) { |
42 | - $this->getRouter()->group($routeConfig, function ($router) { |
|
42 | + $this->getRouter()->group($routeConfig, function($router) { |
|
43 | 43 | /** @var $router \Illuminate\Routing\Router */ |
44 | 44 | $files = $this->getFilesystem()->allFiles(app_path('Admin')); |
45 | 45 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->getRouter()->group([ |
107 | 107 | 'middleware' => ['web', 'httpauth'], |
108 | 108 | 'prefix' => $this->app['config']->get('laractive-admin.route_prefix'), |
109 | - ], function ($router) { |
|
109 | + ], function($router) { |
|
110 | 110 | /* @var $router \Illuminate\Routing\Router */ |
111 | 111 | $router->get('login', [ |
112 | 112 | 'uses' => '\Enomotodev\LaractiveAdmin\Http\Controllers\Auth\LoginController@showLoginForm', |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | ]); |
122 | 122 | }); |
123 | 123 | |
124 | - \Illuminate\Database\Eloquent\Builder::macro('comments', function () { |
|
124 | + \Illuminate\Database\Eloquent\Builder::macro('comments', function() { |
|
125 | 125 | return $this->getModel()->morphMany(LaractiveAdminComment::class, 'commentable'); |
126 | 126 | }); |
127 | 127 | } |
@@ -160,16 +160,16 @@ discard block |
||
160 | 160 | $this->getRouter()->aliasMiddleware('httpauth', HttpauthAuthenticate::class); |
161 | 161 | $this->getRouter()->aliasMiddleware('sharing-data', SharingDataWithAllViews::class); |
162 | 162 | |
163 | - $this->app->singleton('command.laractive-admin.install', function ($app) { |
|
163 | + $this->app->singleton('command.laractive-admin.install', function($app) { |
|
164 | 164 | return new InstallCommand($app['files'], $app['composer']); |
165 | 165 | }); |
166 | - $this->app->singleton('command.laractive-admin.uninstall', function ($app) { |
|
166 | + $this->app->singleton('command.laractive-admin.uninstall', function($app) { |
|
167 | 167 | return new UninstallCommand($app['files'], $app['composer']); |
168 | 168 | }); |
169 | - $this->app->singleton('command.laractive-admin.seed', function () { |
|
169 | + $this->app->singleton('command.laractive-admin.seed', function() { |
|
170 | 170 | return new SeedCommand; |
171 | 171 | }); |
172 | - $this->app->singleton('httpauth', function ($app) { |
|
172 | + $this->app->singleton('httpauth', function($app) { |
|
173 | 173 | return new Httpauth($app['config']->get('laractive-admin.httpauth')); |
174 | 174 | }); |
175 | 175 |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | public function show(int $id) |
115 | 115 | { |
116 | 116 | $model = $this->model::findOrFail($id); |
117 | - $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function ($type, $name) use ($model) { |
|
118 | - return ! in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]); |
|
117 | + $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function($type, $name) use ($model) { |
|
118 | + return !in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]); |
|
119 | 119 | }, ARRAY_FILTER_USE_BOTH); |
120 | 120 | |
121 | 121 | return new HtmlString( |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function create(Request $request) |
159 | 159 | { |
160 | - $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) { |
|
160 | + $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) { |
|
161 | 161 | return $item !== null; |
162 | 162 | }); |
163 | 163 | if (isset($inputs['password'])) { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | continue; |
171 | 171 | } |
172 | 172 | |
173 | - if (! empty($inputs[$key])) { |
|
173 | + if (!empty($inputs[$key])) { |
|
174 | 174 | $model->{$relation['relation_name']}()->sync($inputs[$key]); |
175 | 175 | } |
176 | 176 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | public function update(Request $request, int $id) |
213 | 213 | { |
214 | 214 | $model = $this->model::findOrFail($id); |
215 | - $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) { |
|
215 | + $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) { |
|
216 | 216 | return $item !== null; |
217 | 217 | }); |
218 | 218 | if (isset($inputs['password'])) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | continue; |
226 | 226 | } |
227 | 227 | |
228 | - if (! empty($inputs[$key])) { |
|
228 | + if (!empty($inputs[$key])) { |
|
229 | 229 | $model->{$relation['relation_name']}()->sync($inputs[$key]); |
230 | 230 | } |
231 | 231 | } |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | foreach ($methods as $method) { |
305 | 305 | if ( |
306 | 306 | $method->class != get_class($model) || |
307 | - ! empty($method->getParameters()) || |
|
307 | + !empty($method->getParameters()) || |
|
308 | 308 | $method->getName() == __FUNCTION__ |
309 | 309 | ) { |
310 | 310 | continue; |
@@ -374,8 +374,8 @@ discard block |
||
374 | 374 | */ |
375 | 375 | protected function getInputsWithFiles($request, $inputs) |
376 | 376 | { |
377 | - if (! empty($this->files)) { |
|
378 | - $files = array_filter($inputs, function ($item, $key) { |
|
377 | + if (!empty($this->files)) { |
|
378 | + $files = array_filter($inputs, function($item, $key) { |
|
379 | 379 | return in_array($key, $this->files) && $item instanceof UploadedFile; |
380 | 380 | }, ARRAY_FILTER_USE_BOTH); |
381 | 381 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function handle() |
34 | 34 | { |
35 | - if (! AdminUser::where('email', '[email protected]')->first()) { |
|
35 | + if (!AdminUser::where('email', '[email protected]')->first()) { |
|
36 | 36 | AdminUser::create([ |
37 | 37 | 'email' => self::ADMIN_USER_EMAIL, |
38 | 38 | 'password' => \Hash::make(self::ADMIN_USER_PASSWORD), |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function createAdminUser() |
93 | 93 | { |
94 | - if (! is_dir($directory = app_path('Admin'))) { |
|
94 | + if (!is_dir($directory = app_path('Admin'))) { |
|
95 | 95 | mkdir($directory, 0755, true); |
96 | 96 | } |
97 | 97 | |
@@ -103,13 +103,13 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function createDashboard() |
105 | 105 | { |
106 | - if (! is_dir($directory = app_path('Admin'))) { |
|
106 | + if (!is_dir($directory = app_path('Admin'))) { |
|
107 | 107 | mkdir($directory, 0755, true); |
108 | 108 | } |
109 | 109 | |
110 | 110 | copy(__DIR__.'/stubs/Dashboard.stub', "{$directory}/Dashboard.php"); |
111 | 111 | |
112 | - if (! is_dir($directory = resource_path('views/admin'))) { |
|
112 | + if (!is_dir($directory = resource_path('views/admin'))) { |
|
113 | 113 | mkdir($directory, 0755, true); |
114 | 114 | } |
115 | 115 |