public function hasScope(string $scope): bool
    {
        // always return true if extensions not configured
        return !Group::create()->hasExtension(GroupExtension::class) || $this->getMember()->Groups()->filter([
            'Scopes.Name' => $scope
        ])->count() > 0;
    }
public function hasScope(string $scope): bool
    {
        // always return true if extensions not configured
        return !Group::create()->hasExtension(GroupExtension::class) || $this->getMember()->Groups()->filter([
            'Scopes.Name' => $scope
        ])->count() > 0;
    }
public function hasScope ( string $ scope ) : bool { // always return true if extensions not configured return ! Group :: create ( ) -> hasExtension ( GroupExtension :: class ) || $ this -> getMember ( ) -> Groups ( ) -> filter ( [ 'Scopes.Name' => $ scope ] ) -> count ( ) > 0 ; }
Checks whether the member has a scope. Only works if the GroupExtension has been configured.

@param string $scope
@return bool
Checks whether the member has a scope . Only works if the GroupExtension has been configured .