eloquent-filemaker
eloquent-filemaker copied to clipboard
Fix for multiple attribute mutator support
trafficstars
So far, I was able to make a custom model accessor value for multiple attributes using get following the official guide.
However, Mutating Multiple Attributes was breaking because the FMHasAttributes model override method assumed the custom $key was part of the attributes array. That's not always the case with multiple attribute accessors and mutators.
This is a proposed fix using Laravel's native hasAttributeSetMutator to check using reflection classes if this is a client-only attribute definition.