1 | <?php |
||
5 | abstract class Field |
||
6 | { |
||
7 | /** @var \Illuminate\Database\Eloquent\Model */ |
||
8 | protected $model; |
||
9 | |||
10 | /** @var string|array */ |
||
11 | protected $value; |
||
12 | |||
13 | public function __construct($value, $model) |
||
18 | |||
19 | /** @param array|string $attributes */ |
||
20 | protected function parseAttributesWithKeys($attributes): array |
||
38 | |||
39 | /** |
||
40 | * @param array|string $attributes |
||
41 | * @return array|string |
||
42 | */ |
||
43 | protected function parseAttributes($attributes) |
||
56 | |||
57 | /** @return mixed */ |
||
58 | public function getValue() |
||
62 | |||
63 | /** |
||
64 | * @param array|string $value |
||
65 | * @return mixed |
||
66 | */ |
||
67 | abstract protected function parseValue($value); |
||
68 | } |
||
69 |