Closed WhitePolice closed 5 years ago
To type cast on pivot tables you need to make a pivot model
see Defining Custom Intermediate Table Models
here
@dillingham tried creating intermediate model and adding $casts
attribute in it but still throwing "Array to string conversion" error.
@WhitePolice update the issue with the new code then
Sorry, but there's not enough information to go off of here. If the issue you have still persists, please feel free to open a new issue with all the details of what you're trying, what you expect to happen, what's happening, and how to reproduce it. Thanks!
I'm facing the same issue and I have the casts properly on the pivot model.
i'm doing an edit on that intermediate model (polymorphic) and getting array to string conversion error.
Description:
When using KeyValue field on BelongsToMany I'm getting an error "Array to string conversion".
Steps To Reproduce: