Select (BelongsToMany) throws error with Model::preventSilentlyDiscardingAttributes(); enabled
When I have
Model::preventSilentlyDiscardingAttributes();
enabled in my AppServiceProvider using the following field results into the following error:
field
error
5 Replies
Solution
hmmm
try putting disabled() before relationship()
or, after disabled(), put dehydrated(false)
This worked. Could you explain why? Is there a specific order I should use?
essentially, take a look inside disabled() and relationship()
they both set dehydrated()
but whichever one comes last overwrites the other
a little bit of a bug
Ah check, thank you for the prompt response
V3 is lit af man