I'm making a web app which includes a query like the below:
$entry = Entry::with([
'elements',
'competition.groups.fields',
'competition.groups.reviews'
])->find($id);
What I'd like to do is add something along the lines of:
$entry = Entry::with([
'elements',
'competition.groups.fields',
'competition.groups.reviews' -> where('user_id', '=', Auth::user()->id)
])->find($id);
So I'd like to grab the reviews which belong to the entry, where the review's user_id also matches the currently logged in user. Is there a way of doing this?