First You can Check your project weekend days
Carbon::getWeekendDays()
In your App/Providers/AppServiceProvider.php you can add in boot
method :
Carbon::setWeekStartsAt(Carbon::FRIDAY);
Carbon::setWeekEndsAt(Carbon::THURSDAY);
You can also change Week-end if needed :
Carbon::setWeekendDays([
Carbon::SUNDAY,
Carbon::MONDAY,
]);
Code
use Carbon\Carbon;if (!function_exists('get_date_using_weekend_count')) {
function get_date_using_weekend_count($date,$count,$holidays)
{
$MyDateCarbon = Carbon::parse($date)…