user()->client->getSetting('enable_client_portal') === false) { return redirect()->route('client.error')->with(['title' => ctrans('texts.client_portal'), 'notification' => 'This section of the app has been disabled by the administrator.']); } return $next($request); } }