Assuming I have the following models:
What I'd like to be able to do is
FeedItem::with(['feedable.tags' => function ($q) {
$q->where('tag.name', 'my-tag');
}])->get()
But the feedable relationship seems to get ignored when I try to eager-load it.
If I do a dd('exiting');
within the anonymous function, it never gets called.
Any ideas how I can scope the related model?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community