public function matchRelation($parent, $related, $relatedNode, $relationship, $property, $value = null, $direction = 'out')
    {
        $parentLabels  = $parent->getTable();
        $relatedLabels = $related->getTable();
        $parentNode    = $this->modelAsNode($parentLabels);

        $this->matches[] = array(
            'type'         => 'Relation',
            'property'     => $property,
            'direction'    => $direction,
            'relationship' => $relationship,
            'parent' => array(
                'node'   => $parentNode,
                'labels' => $parentLabels
            ),
            'related' => array(
                'node'   => $relatedNode,
                'labels' => $relatedLabels
            )
        );

        $this->addBinding(array($this->wrap($property) => $value), 'matches');

        return $this;
    }
public function matchRelation($parent, $related, $relatedNode, $relationship, $property, $value = null, $direction = 'out')
    {
        $parentLabels  = $parent->getTable();
        $relatedLabels = $related->getTable();
        $parentNode    = $this->modelAsNode($parentLabels);

        $this->matches[] = array(
            'type'         => 'Relation',
            'property'     => $property,
            'direction'    => $direction,
            'relationship' => $relationship,
            'parent' => array(
                'node'   => $parentNode,
                'labels' => $parentLabels
            ),
            'related' => array(
                'node'   => $relatedNode,
                'labels' => $relatedLabels
            )
        );

        $this->addBinding(array($this->wrap($property) => $value), 'matches');

        return $this;
    }
public function matchRelation ( $ parent , $ related , $ relatedNode , $ relationship , $ property , $ value = null , $ direction = 'out' ) { $ parentLabels = $ parent -> getTable ( ) ; $ relatedLabels = $ related -> getTable ( ) ; $ parentNode = $ this -> modelAsNode ( $ parentLabels ) ; $ this -> matches [ ] = array ( 'type' => 'Relation' , 'property' => $ property , 'direction' => $ direction , 'relationship' => $ relationship , 'parent' => array ( 'node' => $ parentNode , 'labels' => $ parentLabels ) , 'related' => array ( 'node' => $ relatedNode , 'labels' => $ relatedLabels ) ) ; $ this -> addBinding ( array ( $ this -> wrap ( $ property ) => $ value ) , 'matches' ) ; return $ this ; }
Add a relationship MATCH clause to the query.

@param  \Vinelab\NeoEloquent\Eloquent\Model $parent       The parent model of the relationship
@param  \Vinelab\NeoEloquent\Eloquent\Model $related      The related model
@param  string $relatedNode  The related node' placeholder
@param  string $relationship The relationship title
@param  string $property     The parent's property we are matching against
@param  string $value
@param  string $direction Possible values are in, out and in-out
@return \Vinelab\NeoEloquent\Query\Builder|static
Add a relationship MATCH clause to the query .