protected function applyQueryConstraints(array $relations): array
    {
        return $this->mapRelations($relations, function ($relation, $constraint) {
            return [$relation => is_callable($constraint) ? $constraint : $this->resolveQueryConstraint($relation)];
        });
    }
protected function applyQueryConstraints(array $relations): array
    {
        return $this->mapRelations($relations, function ($relation, $constraint) {
            return [$relation => is_callable($constraint) ? $constraint : $this->resolveQueryConstraint($relation)];
        });
    }
protected function applyQueryConstraints ( array $ relations ) : array { return $ this -> mapRelations ( $ relations , function ( $ relation , $ constraint ) { return [ $ relation => is_callable ( $ constraint ) ? $ constraint : $ this -> resolveQueryConstraint ( $ relation ) ] ; } ) ; }
Applies any query constraints defined in the transformer to the list of relaations.

@param  array $relations
@return array
Applies any query constraints defined in the transformer to the list of relaations .