I found only this on any questions and answers out here but none are related to carbon.
Is there a way to do this in carbon:
$start = (new DateTime('2018-06-01'))->modify('first day of this month');
$end = (new DateTime('2019-06-01'))->modify('first day of next month');
$interval = DateInterval::createFromDateString('1 month');
$period = new DatePeriod($start, $interval, $end);
foreach ($period as $dt) {
echo $dt->format("Y-m") . "<br>\n";
}