auth = $auth; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $theNext * * @return mixed */ public function handle($request, Closure $theNext) { if ($this->auth->check()) { // ignore preference. set the range to be the current month: if (!Session::has('start') && !Session::has('end')) { /** @var \FireflyIII\Models\Preference $viewRange */ $viewRange = Preferences::get('viewRange', '1M'); $start = Session::has('start') ? Session::get('start') : new Carbon; $start = Navigation::updateStartDate($viewRange->data, $start); $end = Navigation::updateEndDate($viewRange->data, $start); Session::put('start', $start); Session::put('end', $end); } } return $theNext($request); } }