Fellow coders,
I'm trying to get the data from last month divided in weeks from the database, I have heard about Carbon but I have no idea on how implement carbon in my actual data.
Does anyone have an idea on how to do this?
I currently have
$currentDate = Carbon::now()->subWeek();
$agoDate = $currentDate->subDays($currentDate->dayOfWeek)->subWeek();
Which does return the useful date info. But I would love to see how it's executed with some dummy data