@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | ]; |
36 | 36 | |
37 | 37 | if (is_dir($directory = app_path('Admin'))) { |
38 | - $this->getRouter()->group($routeConfig, function ($router) { |
|
38 | + $this->getRouter()->group($routeConfig, function($router) { |
|
39 | 39 | /** @var $router \Illuminate\Routing\Router */ |
40 | 40 | $files = $this->getFilesystem()->allFiles(app_path('Admin')); |
41 | 41 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ]); |
117 | 117 | }); |
118 | 118 | |
119 | - \Illuminate\Database\Eloquent\Builder::macro('comments', function () { |
|
119 | + \Illuminate\Database\Eloquent\Builder::macro('comments', function() { |
|
120 | 120 | return $this->getModel()->morphMany(LaractiveAdminComment::class, 'commentable'); |
121 | 121 | }); |
122 | 122 | } |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | |
153 | 153 | $this->getRouter()->aliasMiddleware('laractive-admin', LaractiveAdminAuthenticate::class); |
154 | 154 | |
155 | - $this->app->singleton('command.laractive-admin.install', function ($app) { |
|
155 | + $this->app->singleton('command.laractive-admin.install', function($app) { |
|
156 | 156 | return new InstallCommand($app['files'], $app['composer']); |
157 | 157 | }); |
158 | - $this->app->singleton('command.laractive-admin.uninstall', function ($app) { |
|
158 | + $this->app->singleton('command.laractive-admin.uninstall', function($app) { |
|
159 | 159 | return new UninstallCommand($app['files'], $app['composer']); |
160 | 160 | }); |
161 | - $this->app->singleton('command.laractive-admin.seed', function () { |
|
161 | + $this->app->singleton('command.laractive-admin.seed', function() { |
|
162 | 162 | return new SeedCommand; |
163 | 163 | }); |
164 | 164 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | protected function configPath() |
174 | 174 | { |
175 | - return __DIR__ . '/../config/laractive-admin.php'; |
|
175 | + return __DIR__.'/../config/laractive-admin.php'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | try { |
67 | 67 | foreach ($migrations as $migration) { |
68 | 68 | $fullPath = $this->createBaseMigration($migration); |
69 | - $this->files->put($fullPath, $this->files->get(__DIR__ . "/stubs/{$migration}.stub")); |
|
69 | + $this->files->put($fullPath, $this->files->get(__DIR__."/stubs/{$migration}.stub")); |
|
70 | 70 | } |
71 | 71 | $this->composer->dumpAutoloads(); |
72 | 72 | } catch (FileNotFoundException $exception) { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | protected function createAdminUser() |
92 | 92 | { |
93 | - if (! is_dir($directory = app_path('Admin'))) { |
|
93 | + if (!is_dir($directory = app_path('Admin'))) { |
|
94 | 94 | mkdir($directory, 0755, true); |
95 | 95 | } |
96 | 96 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | public function show(int $id) |
107 | 107 | { |
108 | 108 | $model = $this->model::findOrFail($id); |
109 | - $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function ($type, $name) use ($model) { |
|
109 | + $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function($type, $name) use ($model) { |
|
110 | 110 | return !in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]); |
111 | 111 | }, ARRAY_FILTER_USE_BOTH); |
112 | 112 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function create(Request $request) |
155 | 155 | { |
156 | - $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) { |
|
156 | + $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) { |
|
157 | 157 | return $item !== null; |
158 | 158 | }); |
159 | 159 | if (isset($inputs['password'])) { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | public function update(Request $request, int $id) |
211 | 211 | { |
212 | 212 | $model = $this->model::findOrFail($id); |
213 | - $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) { |
|
213 | + $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) { |
|
214 | 214 | return $item !== null; |
215 | 215 | }); |
216 | 216 | if (isset($inputs['password'])) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | |
288 | 288 | try { |
289 | 289 | $methods = (new ReflectionClass($model))->getMethods(ReflectionMethod::IS_PUBLIC); |
290 | - foreach($methods as $method) { |
|
290 | + foreach ($methods as $method) { |
|
291 | 291 | if ( |
292 | 292 | $method->class != get_class($model) || |
293 | 293 | !empty($method->getParameters()) || |
@@ -372,8 +372,8 @@ discard block |
||
372 | 372 | */ |
373 | 373 | protected function getInputsWithFiles($request, $inputs) |
374 | 374 | { |
375 | - if (! empty($this->files)) { |
|
376 | - $files = array_filter($inputs, function ($item, $key) { |
|
375 | + if (!empty($this->files)) { |
|
376 | + $files = array_filter($inputs, function($item, $key) { |
|
377 | 377 | return in_array($key, $this->files) && $item instanceof UploadedFile; |
378 | 378 | }, ARRAY_FILTER_USE_BOTH); |
379 | 379 |