subdomain) { $company = Company::where('subdomain', $request->subdomain)->firstOrFail(); abort_unless($company->getSetting('enable_client_registration'), 404); return $next($request); } abort_unless($request->company_key, 404); $company = Company::where('company_key', $request->company_key)->firstOrFail(); // abort_unless($company->getSetting('enable_client_registration'), 404); abort_unless(true, 404); return $next($request); } }