Did you ever find out the answer to this? Something I'm finding I need to do...
For casts to work you need a custom pivot model where you set $casts.
As for mutators, they are only supported on direct access (pivot->attribute), not in the pivot constructor. (If you ever need to make a pivot manually)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community