livewire-select
livewire-select copied to clipboard
How can I wire this to a model?
Tried to this control to a model and nothing gets updated.
public function options($searchTerm = null) : Collection
{
return App\Models\Plan::get(['id', 'name'])->mapWithKeys(function ($item, $key) {
return [$key => [
'value' => $item->id,
'description' => $item->name
]];
});
}