| @@ 42-52 (lines=11) @@ | ||
| 39 | return (string)parent::getValue(); | |
| 40 | } | |
| 41 | ||
| 42 | protected function parseOptions($options) | |
| 43 |     { | |
| 44 |         return collect($options)->mapWithKeys(function ($value, $key) { | |
| 45 | return [ | |
| 46 | $key => [ | |
| 47 | 'label' => $value, | |
| 48 | 'value' => (string)$key, | |
| 49 | ], | |
| 50 | ]; | |
| 51 | })->values(); | |
| 52 | } | |
| 53 | ||
| 54 | public function toArray() | |
| 55 |     { | |
| @@ 62-72 (lines=11) @@ | ||
| 59 | } | |
| 60 | } | |
| 61 | ||
| 62 | protected function parseOptions($options) | |
| 63 |     { | |
| 64 |         return collect($options)->mapWithKeys(function ($value, $key) { | |
| 65 | return [ | |
| 66 | $key => [ | |
| 67 | 'id' => (string)$key, | |
| 68 | 'label' => $value, | |
| 69 | ], | |
| 70 | ]; | |
| 71 | })->values(); | |
| 72 | } | |
| 73 | ||
| 74 | public function toArray() | |
| 75 |     { | |