Well, it turns out that the filtering is done by using whereDoesntHave
, leaving the solution here for future reference.
$posts = Post::with('tags')->whereDoesntHave('tags', function ($q) {
$q->where('name', '=', 'is-project');
})->where('published_at', '!=', 'null')->orderBy('created_at', 'desc')->paginate(3);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community