php last 12 month for Carbon
unknown
php
4 years ago
466 B
5
Indexable
public function last_carbon_month()
{
for ($i=0; $i <= 12 ; $i++) {
$last_month[$i] = new \stdClass;
$last_month[$i]->date = Carbon::now()->subMonth($i)->isoFormat('Do.MM.YYYY');
$last_month[$i]->text = Carbon::now()->subMonth($i)->isoFormat('Do MMM YYYY');
$last_month[$i]->payments = "elma";
}
return Response::withData(true, 'last 12 mounth successfully listed', $last_month);
}Editor is loading...