cookie('sessionKey'); $appSession = AppSession::where('session_key', $sessionKey)->where('is_active', true)->first(); $authenticated = $sessionKey && $appSession && $appSession->pro && $appSession->pro->is_considered_for_dna; if (!$authenticated) { return abort(403); } return $next($request); } }