laravel get only between dates two column code example
Example: how to get dates between two dates in laravel
// how to get dates between two dates in laravel?
//NOTE => for this you can use Carbon
use Carbon\CarbonPeriod;
$period = CarbonPeriod::create("2020-5-20", "2020-5-30");
foreach ($period as $date) {
// Insert Dates into listOfDates Array
$listOfDates[] = $date->format('Y-m-d');
}
// Now You Can Review This Array
dd($listOfDates);