Answers for "get the date between two dates and put status 1 lravel"

PHP
0

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);
Posted by: Guest on March-05-2021

Code answers related to "get the date between two dates and put status 1 lravel"

Browse Popular Code Answers by Language