src/SoftDeletesBoolean.php
/**
     * Perform the actual delete query on this model instance.
     *
     * @return void
     */
Perform the actual delete query on this model instance.
@return void
Perform the actual delete query on this model instance . @return void
protected function runSoftDelete()
    {
        $query = $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey());
        $time = $this->freshTimestamp();
        $columns = [$this->getIsDeletedColumn() => 1];
        $this->{$this->getIsDeletedColumn()} = 1;
        if ($this->timestamps && ! is_null($this->getUpdatedAtColumn())) {
            $this->{$this->getUpdatedAtColumn()} = $time;
            $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time);
        }
        $query->update($columns);
    }
protected function runSoftDelete ( ) { $ query = $ this -> newQueryWithoutScopes ( ) -> where ( $ this -> getKeyName ( ) , $ this -> getKey ( ) ) ; $ time = $ this -> freshTimestamp ( ) ; $ columns = [ $ this -> getIsDeletedColumn ( ) => 1 ] ; $ this -> { $ this -> getIsDeletedColumn ( ) } = 1 ; if ( $ this -> timestamps && ! is_null ( $ this -> getUpdatedAtColumn ( ) ) ) { $ this -> { $ this -> getUpdatedAtColumn ( ) } = $ time ; $ columns [ $ this -> getUpdatedAtColumn ( ) ] = $ this -> fromDateTime ( $ time ) ; } $ query -> update ( $ columns ) ; }
Perform the actual delete query on this model instance.
Perform the actual delete query on this model instance .