public function forceDelete()
    {
        // get records
        $affectedRecords = $this->getAffectedRecords()->toArray();
        $ids = array_map(function($record) {
            return $record->{$this->model->getKeyName()};
        }, $affectedRecords);

        // delete main table records
        if (! $this->query->delete()) {
            return false;
        }

        // delete version table records
        $db = $this->model->getConnection();
        return $db->table($this->model->getVersionTable())
            ->whereIn($this->model->getVersionKeyName(), $ids)
            ->delete();
    }
public function forceDelete()
    {
        // get records
        $affectedRecords = $this->getAffectedRecords()->toArray();
        $ids = array_map(function($record) {
            return $record->{$this->model->getKeyName()};
        }, $affectedRecords);

        // delete main table records
        if (! $this->query->delete()) {
            return false;
        }

        // delete version table records
        $db = $this->model->getConnection();
        return $db->table($this->model->getVersionTable())
            ->whereIn($this->model->getVersionKeyName(), $ids)
            ->delete();
    }
public function forceDelete ( ) { // get records $ affectedRecords = $ this -> getAffectedRecords ( ) -> toArray ( ) ; $ ids = array_map ( function ( $ record ) { return $ record -> { $ this -> model -> getKeyName ( ) } ; } , $ affectedRecords ) ; // delete main table records if ( ! $ this -> query -> delete ( ) ) { return false ; } // delete version table records $ db = $ this -> model -> getConnection ( ) ; return $ db -> table ( $ this -> model -> getVersionTable ( ) ) -> whereIn ( $ this -> model -> getVersionKeyName ( ) , $ ids ) -> delete ( ) ; }
Run the default delete function on the builder.

@return mixed
Run the default delete function on the builder .