If you want to selecting a data with two date start date and end date in laravel so you can use given example below-
Example 1:
$start_date=carbon::parse($startDate)->format(“Y-m-d”);
$end_date=carbon::parse($endDate)->format(“Y-m-d”);
$query=User::query();
$query->whereDate(“created_at”,”>=”, $start_date);
$query->whereDate(“created_at”,”<=”, $start_date);
$query->get();
And If you want selecting a data with single date field in laravel you can use given example below-
Example 2:
$date=carbon::parse($date)->format(“Y-m-d”);
$query=User::query();
$query->whereDate(“created_at”,”=”, $date);
$query->get();
*Spot on with this write-up, I truly think this website needs much more consideration. I?ll probably be again to read much more, thanks for that info.