Level 11
Jun 19, 2020
1
Level 2
Exclude some date data in laravel eloquent
I have these queries
$today_date = date('Y-m-d');
1- get today data
->whereDate('report_date', $today_date);
2- Last 7 days
->whereDate('report_date','>', Carbon::now()->subDays(7))
3- Last 30 days
->whereDate('report_date', '>', Carbon::now()->subDays(30))
I want to exclude today data from last 7 days data & exclide 1 & 2 data from last 30 days.
Also how to get data more than 30 days ?
Please or to participate in this conversation.