miomech
Can someone explain to my why ->dehydrated() works for storing data on disabled fields?
->dehydrated() is simply a shorthand for ->dehydrated(true)
if you want the field to not be dehydrated you can add ->dehydrated(false) to it.
dehydrated(false) in plain English means: "Don't send the data in this form field to the backend php"
From my understanding when a form is "disabled" it is automatically set to ->dehydrated(false).
7 replies
Convert Eloquent relationship to query builder for table?
You should be able to use toQuery on a model:
https://laravel.com/docs/10.x/eloquent-collections#method-toquery
In your table you should be able to use
I had something like that working at some point. Can't remember what I ended up doing 100% though.
3 replies