src/SoftDeletesBoolean.php
/**
     * Restore a soft-deleted model instance.
     *
     * @return bool|null
     */
Restore a soft-deleted model instance.
@return bool|null
Restore a soft - deleted model instance . @return bool|null
public function restore()
    {
        if ($this->fireModelEvent('restoring') === false) {
            return false;
        }
        $this->{$this->getIsDeletedColumn()} = 0;
        $this->exists = true;
        $result = $this->save();
        $this->fireModelEvent('restored', false);
        return $result;
    }
public function restore ( ) { if ( $ this -> fireModelEvent ( 'restoring' ) === false ) { return false ; } $ this -> { $ this -> getIsDeletedColumn ( ) } = 0 ; $ this -> exists = true ; $ result = $ this -> save ( ) ; $ this -> fireModelEvent ( 'restored' , false ) ; return $ result ; }
Restore a soft-deleted model instance.
Restore a soft - deleted model instance .
// If the restoring event does not return false, we will proceed with this // restore operation. Otherwise, we bail out so the developer will stop // the restore totally. We will clear the deleted timestamp and save. // Once we have saved the model, we will fire the "restored" event so this // developer will do anything they need to after a restore operation is // totally finished. Then we will return the result of the save call.