Closed ryanvelbon closed 2 weeks ago
Currently <x-select> seems to only work with simple arrays.
<x-select>
If we tried passing in an Enum
@php $statusOptions = \App\Enums\PostStatus::cases(); @endphp <x-select label="Status" :options="$statusOptions" wire:model="status" />
We would get the following error
Cannot use object of type App\Enums\PostStatus as array
Could share that enum definition?
Just modified to a simpler approach. Thanks!
This is a way cleaner approach! Thank you for merging.
Currently
<x-select>
seems to only work with simple arrays.If we tried passing in an Enum
We would get the following error