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