protected function validateAllFields(): bool
    {
        $duplicates = collect(
            (array) $this->dataGet('attributes', [])
        )->intersectByKeys(
            (array) $this->dataGet('relationships', [])
        )->keys();

        $this->resourceFieldsExistInAttributesAndRelationships($duplicates);

        return $duplicates->isEmpty();
    }
protected function validateAllFields(): bool
    {
        $duplicates = collect(
            (array) $this->dataGet('attributes', [])
        )->intersectByKeys(
            (array) $this->dataGet('relationships', [])
        )->keys();

        $this->resourceFieldsExistInAttributesAndRelationships($duplicates);

        return $duplicates->isEmpty();
    }
protected function validateAllFields ( ) : bool { $ duplicates = collect ( ( array ) $ this -> dataGet ( 'attributes' , [ ] ) ) -> intersectByKeys ( ( array ) $ this -> dataGet ( 'relationships' , [ ] ) ) -> keys ( ) ; $ this -> resourceFieldsExistInAttributesAndRelationships ( $ duplicates ) ; return $ duplicates -> isEmpty ( ) ; }
Validate the resource's attributes and relationships collectively.

@return bool
Validate the resource s attributes and relationships collectively .