use Carbon\Carbon;
$now = Carbon::now();
$daysPassed = $now->day; // Current day of the month
echo $daysPassed;
use Carbon\Carbon;
// Days passed in a week
$now = Carbon::now();
$daysPassed = $now->dayOfWeek; // 0 (Sunday) to 6 (Saturday)
echo $daysPassed;
// Days passed in a month
$now = Carbon::now();
$daysPassed = $now->day; // Current day of the month
echo $daysPassed;
// Get days passed in a week with Monday as the start
Carbon::setWeekStartsAt(Carbon::MONDAY);
$now = Carbon::now();
$daysPassed = ($now->dayOfWeek + 6) % 7; // 0 (Monday) to 6 (Sunday)
echo $daysPassed;