@@ -19,18 +19,18 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | private function toData($request): array |
| 21 | 21 | { |
| 22 | - if($request instanceof Request) { |
|
| 22 | + if ($request instanceof Request) { |
|
| 23 | 23 | return $request->all(); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if(is_array($request)) { |
|
| 26 | + if (is_array($request)) { |
|
| 27 | 27 | return $request; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return []; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - public static function for(Model $model, $request = null): self |
|
| 33 | + public static function for (Model $model, $request = null): self |
|
| 34 | 34 | { |
| 35 | 35 | return new static($model, $request ?? request()); |
| 36 | 36 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $fields = collect($fields); |
| 41 | 41 | |
| 42 | 42 | $fields->each(function($field) { |
| 43 | - if($this->fieldExists($field)) { |
|
| 43 | + if ($this->fieldExists($field)) { |
|
| 44 | 44 | $this->model->{$field} = $this->data[$field]; |
| 45 | 45 | } |
| 46 | 46 | }); |