F
Filament12mo 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 Paauw12mo ago
Try Product::all()->pluck(‘name’, ‘name’);. That should do the trick
myster
mysterOP12mo ago
Thanks for the answer! I thought about it, but it didn't work. Wow, I'm completely wrong!! You are correct, thank you!!
Want results from more Discord servers?
Add your server