Hello
Something like that :
$parents = Parent::with(['childs' => function($q)
{
$q->join('tags', 'childs.tag_id', '=', 'tags.id')->where('tags.level', '=', 0);
}])->get();
But "Parent" is a reserved word that will not fit.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community