PHP provides ways to get the number of the current day of the month (date(\'j\')) as well as the number of the current day of the year (date(\'z\')). Is there a way to get the n
You can use Carbon it has easy modifiers for getFirstOf{Month,Year,Quarter}()
copy()->firstOfQuarter(); //calculate the difference in days and add 1 to correct the index $dayOfQuarter = $now->diffInDays($firstOfQuarter) + 1;