Im have a simple task as i think but im have some troble with this
Mb anyone know another way how to get all months of the year with Carbon using
In this sutiation im need only short name of month
At this time im have the next code
$items = [];
$startMonth = Carbon::now()->startOfYear()->format('M');
$endMonth = Carbon::now()->endOfYear()->format('M');
$monthRange = CarbonPeriod::create($startMonth, '1 month', $endMonth);
foreach ($monthRange as $month){
$items[] = Carbon::parse($month)->format('M');
}
Are there any solutions without overwriting the variable $items
Thanks for help