asantibanez/livewire-select

How can I wire this to a model?

Opened this issue · 1 comments

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
            ]];
        });
}