Update the ranges to reflect the current dates.

This commit is contained in:
James Cole
2015-03-05 21:13:38 +01:00
parent 1139f950ed
commit e9969bdd5f
3 changed files with 25 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ use Illuminate\Contracts\Auth\Guard;
use Navigation;
use Preferences;
use Session;
use View;
/**
* Class SessionFilter
@@ -68,6 +69,14 @@ class Range
}
}
// set current / next / prev month.
$current = Carbon::now()->format('F Y');
$next = Carbon::now()->endOfMonth()->addDay()->format('F Y');
$prev = Carbon::now()->startOfMonth()->subDay()->format('F Y');
View::share('currentMonthName', $current);
View::share('previousMonthName', $prev);
View::share('nextMonthName', $next);
}