@@ -247,7 +247,7 @@ |
||
247 | 247 | 'prefix' => $this->route_uri_prefix, |
248 | 248 | 'as' => $this->route_name_prefix, |
249 | 249 | 'middleware' => 'web' |
250 | - ], function ($router) use ($routes, $controller) |
|
250 | + ], function($router) use ($routes, $controller) |
|
251 | 251 | { |
252 | 252 | foreach ($routes as $route) |
253 | 253 | { |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | $this->fields->hydrateErrorsFromSession(); |
61 | 61 | $this->fields->hydrateFieldsFromSession(); |
62 | 62 | } |
63 | - } |
|
64 | - else |
|
63 | + } else |
|
65 | 64 | { |
66 | 65 | throw new InvalidModelException("The model must use Crudable trait."); |
67 | 66 | } |
@@ -147,8 +146,7 @@ discard block |
||
147 | 146 | 'csrf_field' => csrf_field(), |
148 | 147 | 'method_field' => method_field($method), |
149 | 148 | ]; |
150 | - } |
|
151 | - else |
|
149 | + } else |
|
152 | 150 | { |
153 | 151 | $view_name = 'crud::form-update'; |
154 | 152 | $method = $this->manager->getActionMethod('update'); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | /** |
39 | 39 | * CrudEntry constructor. |
40 | 40 | * |
41 | - * @param Model|Crudable $model |
|
41 | + * @param Model $model |
|
42 | 42 | * @throws \InvalidArgumentException |
43 | 43 | */ |
44 | 44 | public function __construct(Model $model) |
@@ -62,8 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $this->addRule($rule); |
64 | 64 | } |
65 | - } |
|
66 | - else |
|
65 | + } else |
|
67 | 66 | { |
68 | 67 | if (is_string($rules)) |
69 | 68 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Akibatech\Crud\Fields; |
4 | 4 | |
5 | 5 | use Akibatech\Crud\Services\CrudFields; |
6 | -use Illuminate\Database\Eloquent\Model; |
|
7 | 6 | |
8 | 7 | /** |
9 | 8 | * Class Field |