We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I add this relation to my resource to only show it when it's loaded?
I have this pivot between Module And File with an added language_id to this pivot
Module
File
language_id
'pivot' => $this->whenPivotLoaded('module_file', fn () => [ 'sequence' => $this->pivot->sequence, 'language_id' => $this->pivot->language_id, 'language_code' => $this->whenLoaded('language', $this->pivot->language->code), // Doesn't show 'language_code' => $this->pivot->whenLoaded('language', $this->pivot->language->code), // Error 'language_code' => $this->whenPivotLoaded('language', $this->pivot->language->code), // Doesn't show ]),
The Language relation doesnt even show when I just use
Language
'pivot' => $this->whenPivotLoaded('module_file', $this->pivot), 'pivot' => $this->whenPivotLoaded('module_file', fn () => $this->pivot),
How would this work?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How can I add this relation to my resource to only show it when it's loaded?
I have this pivot between
Module
AndFile
with an addedlanguage_id
to this pivotThe
Language
relation doesnt even show when I just useHow would this work?
The text was updated successfully, but these errors were encountered: