header('company'); if (! $scope) { $fallback = $request->user()->companies()->first(); if ($fallback === null) { return $next($request); } $scope = $fallback->id; } $this->bouncer->scope()->to($scope); return $next($request); } }