Do you want to have a list per day, since you compare the data between two dates?
It's a bit unclear to me.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have users table and posts table. I want all users who didnt post from 01/01/2020 00:00:00 to 01/02/2020 23:00:00
What I have so far is:
User::whereDoesntHave('posts',function($query) use ($first_date,$last_date){
$query->whereBetween('posts.date',[$first_date,$last_date]);
})->get();
All I want is a result like this:
01/01/2020 -John -Jack -Marie 01/02/2020 -Laura -Jack -Marie
Hope somebody help me. I have tried so many things and still didnt get a solution.
Please or to participate in this conversation.