ashanoulu liked this thread
You could try a whereDoesntHave
$notRead = News::whereDoesntHave('readUsers', function ($q) {
$q->where('user_id', Auth::id());
})->orderBy('date', 'ASC')->paginate(20);
ashanoulu liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community