Move date picker stuff to new method.

This commit is contained in:
James Cole 2016-06-11 06:33:51 +02:00
parent 7a5ef6013a
commit b80d8cf774

View File

@ -84,6 +84,16 @@ class Range
}
Session::put('first', $first);
}
}
$this->datePicker();
return $theNext($request);
}
private function datePicker()
{
$current = Carbon::now()->formatLocalized('%B %Y');
$next = Carbon::now()->endOfMonth()->addDay()->formatLocalized('%B %Y');
$prev = Carbon::now()->startOfMonth()->subDay()->formatLocalized('%B %Y');
@ -92,8 +102,4 @@ class Range
View::share('nextMonthName', $next);
}
return $theNext($request);
}
}