@@ -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 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function show(int $id) |
101 | 101 | { |
102 | 102 | $model = $this->model::findOrFail($id); |
103 | - $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function ($type, $name) use ($model) { |
|
103 | + $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function($type, $name) use ($model) { |
|
104 | 104 | return !in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]); |
105 | 105 | }, ARRAY_FILTER_USE_BOTH); |
106 | 106 | |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function create(Request $request) |
147 | 147 | { |
148 | - $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) { |
|
148 | + $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) { |
|
149 | 149 | return $item !== null; |
150 | 150 | }); |
151 | 151 | if (isset($inputs['password'])) { |
152 | 152 | $inputs['password'] = \Hash::make($inputs['password']); |
153 | 153 | } |
154 | 154 | if (!empty($this->files)) { |
155 | - $files = array_filter($inputs, function ($item, $key) { |
|
155 | + $files = array_filter($inputs, function($item, $key) { |
|
156 | 156 | return in_array($key, $this->files) && $item instanceof UploadedFile; |
157 | 157 | }, ARRAY_FILTER_USE_BOTH); |
158 | 158 | |
@@ -212,14 +212,14 @@ 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'])) { |
219 | 219 | $inputs['password'] = \Hash::make($inputs['password']); |
220 | 220 | } |
221 | 221 | if (!empty($this->files)) { |
222 | - $files = array_filter($inputs, function ($item, $key) { |
|
222 | + $files = array_filter($inputs, function($item, $key) { |
|
223 | 223 | return in_array($key, $this->files) && $item instanceof UploadedFile; |
224 | 224 | }, ARRAY_FILTER_USE_BOTH); |
225 | 225 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | try { |
302 | 302 | $methods = (new ReflectionClass($model))->getMethods(ReflectionMethod::IS_PUBLIC); |
303 | - foreach($methods as $method) { |
|
303 | + foreach ($methods as $method) { |
|
304 | 304 | if ( |
305 | 305 | $method->class != get_class($model) || |
306 | 306 | !empty($method->getParameters()) || |