src/Query/Runner.php
public function delete($id = null)
    {
        // If an ID is passed to the method, we will set the where clause to check
        // the ID to allow developers to simply and quickly remove a single row
        // from their database without manually specifying the where clauses.
        if (!is_null($id)) {
            $this->where('_id', '=', $id);
        }

        $wheres = $this->compileWheres();
        $result = $this->collection->deleteMany($wheres);

        if (1 == (int) $result->isAcknowledged()) {
            return $result->getDeletedCount();
        }

        return 0;
    }
public function delete($id = null)
    {
        // If an ID is passed to the method, we will set the where clause to check
        // the ID to allow developers to simply and quickly remove a single row
        // from their database without manually specifying the where clauses.
        if (!is_null($id)) {
            $this->where('_id', '=', $id);
        }

        $wheres = $this->compileWheres();
        $result = $this->collection->deleteMany($wheres);

        if (1 == (int) $result->isAcknowledged()) {
            return $result->getDeletedCount();
        }

        return 0;
    }
public function delete ( $ id = null ) { // If an ID is passed to the method, we will set the where clause to check // the ID to allow developers to simply and quickly remove a single row // from their database without manually specifying the where clauses. if ( ! is_null ( $ id ) ) { $ this -> where ( '_id' , '=' , $ id ) ; } $ wheres = $ this -> compileWheres ( ) ; $ result = $ this -> collection -> deleteMany ( $ wheres ) ; if ( 1 == ( int ) $ result -> isAcknowledged ( ) ) { return $ result -> getDeletedCount ( ) ; } return 0 ; }
Delete documents.

@param null $id
@return int
Delete documents .