I'm trying to retrieve all of the Mondays and Tuesdays and the last Sunday of every month with Carbon since a specific date in the past. Then I would like to loop through the array of days and create an even for that day. I'm trying to figure out how to do that?
// Get all dates of Mondays, Tuesdays, last Sundays of every Month since the first Monday of January of 2000.
$eventDates = Carbon::parse('first Monday of January 2000');
$i = 0;
while($eventDates->lt(Carbon::now()->subDay(14))) {
$event = factory(Event::class)->create([
'date' => $eventDate,
]);
}