shouldRedirect()) { return $next($request); } if (!$this->initialized()) { return redirect()->route('initialize.index'); } return $next($request); } public function shouldRedirect() { return !request()->routeIs($this->dontRedirect) && auth()->check(); } public function initialized() { return \App\Fee::count() > 0; } }