laravel-responder
laravel-responder copied to clipboard
Relationship not using custom resourcekey when loaded data
Hi @flugger, this is an awesome project!
Btw; I have 2 models that related to each other with custom resourcekey, but I cannot have my custom resourcekey for the related model. What I've got is what I've define in the transformer ($load) as the resourcekey not the custom resourcekey that I already defined in getResourceKey() of the models.
Is there a way to use the getResourceKey() as the custom resourcekey on the relational ?
Hi @wukongrita, thanks for the kind words. Do I understand you correctly in that you rather have the getResourceKey take precedence over the keys in the $load property?
yes... or maybe there is a variable to set which keys that i would like to use? (either the getResourcekey or $load)