public function getCurrentScope()
    {
        $key = request(Scope::QUERY_NAME);

        return $this->scopes->first(function ($scope) use ($key) {
            return $scope->key == $key;
        });
    }
public function getCurrentScope()
    {
        $key = request(Scope::QUERY_NAME);

        return $this->scopes->first(function ($scope) use ($key) {
            return $scope->key == $key;
        });
    }
public function getCurrentScope ( ) { $ key = request ( Scope :: QUERY_NAME ) ; return $ this -> scopes -> first ( function ( $ scope ) use ( $ key ) { return $ scope -> key == $ key ; } ) ; }
Get current scope.

@return Scope|null
Get current scope .