$datetime->format('Y-m'), ]); $datetime->addMonth(); if ($datetime > Carbon::now()) { break; } } }