Dzień tygodnia za pomocą biblioteki węgla

// CALCULATE DAY OF WEEK (USING CARBON LIBRARY Laravel)

use Carbon\Carbon;

// pass dynamic day
$date = "2021-5-18";
$day  = new DateTime($date);
$dayOfWeek = $day->format('l');
Copy Paster