@php
//$nextMonday = strtotime('next Wednesday');
//$nextMonday = strtotime('-0 day', strtotime('+1 month'));
if($GetLastDate)
{
$nextMonday=strtotime($GetLastDate);
}
else
{
$nextMonday = strtotime('last day of this month');
}
$today = time();
$DateArray=array();
while ($today <= $nextMonday) {
$displayDate=date('Y-m-d', $today);
$displayDateNew=date('d-m-Y', $today);
$day = date('l', strtotime($displayDate));
$DateArray[$displayDate]=$displayDateNew." (".$day.") ";
$today = strtotime('+1 day', $today);
}
$displaysDateNew=date('Y-m-d', $nextMonday);
$dayNew = date('l', strtotime($displaysDateNew));
$displaysDateNewdmy=date('d-m-Y', $nextMonday);
$DateArray[$displaysDateNew]=$displaysDateNewdmy." (".$dayNew.") ";
@endphp
@endsection