Allow $model->relationLoaded() to check for nested relations with dot notation #51774
Unanswered
rcoudercher
asked this question in
Ideas
Replies: 1 comment 4 replies
-
You can do |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just had to check if a model had a nested relation loaded. It was in a JsonResource if that matters. I tried doing
$this->relationLoaded('contract.partner')
with the dot notation as I had just eager loaded those relations with an identical dot notation, before realising that wasn't possible. I think it would be a nice feature to add. What do you think ?Beta Was this translation helpful? Give feedback.
All reactions