public function compileDelete(Builder $query)
    {
        // We always need the MATCH clause in our Cypher which
        // is the responsibility of compiling the From component.
        $match = $this->compileComponents($query, array('from'));
        $match = $match['from'];

        $where = is_array($query->wheres) ? $this->compileWheres($query) : '';

       
        return "$match $where OPTIONAL $match-[r]-()  $where DELETE  " . $query->modelAsNode().",r";

    }
public function compileDelete(Builder $query)
    {
        // We always need the MATCH clause in our Cypher which
        // is the responsibility of compiling the From component.
        $match = $this->compileComponents($query, array('from'));
        $match = $match['from'];

        $where = is_array($query->wheres) ? $this->compileWheres($query) : '';

       
        return "$match $where OPTIONAL $match-[r]-()  $where DELETE  " . $query->modelAsNode().",r";

    }
public function compileDelete ( Builder $ query ) { // We always need the MATCH clause in our Cypher which // is the responsibility of compiling the From component. $ match = $ this -> compileComponents ( $ query , array ( 'from' ) ) ; $ match = $ match [ 'from' ] ; $ where = is_array ( $ query -> wheres ) ? $ this -> compileWheres ( $ query ) : '' ; return "$match $where OPTIONAL $match-[r]-()  $where DELETE  " . $ query -> modelAsNode ( ) . ",r" ; }
Compile a delete statement into Cypher.

@param  \Illuminate\Database\Query\Builder  $query
@return string
Compile a delete statement into Cypher .