F
Filament14mo ago
myster

Select method [resolved]

I am using the Select method
->options(User::all()->pluck('name', 'id'))
->options(User::all()->pluck('name', 'id'))
But I notice that when I select a product and save it, the id is actually saved in the database. Would it be possible to also save the product name?
No description
2 Replies
Maarten Paauw
Maarten Paauw14mo ago
Try Product::all()->pluck(‘name’, ‘name’);. That should do the trick
myster
mysterOP14mo ago
Thanks for the answer! I thought about it, but it didn't work. Wow, I'm completely wrong!! You are correct, thank you!!

Did you find this page helpful?