livewire-select icon indicating copy to clipboard operation
livewire-select copied to clipboard

How can I wire this to a model?

Open SamuelMunoz opened this issue 3 years ago • 1 comments

Tried to this control to a model and nothing gets updated.

SamuelMunoz avatar Jun 22 '21 20:06 SamuelMunoz

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

amrography avatar Jul 18 '21 09:07 amrography