src/Listeners/Deleting.php
public function handle($model)
    {
        if (! $model -> isUserstamping()) {
            return;
        }

        if (is_null($model -> {$model -> getDeletedByColumn()})) {
            $model -> {$model -> getDeletedByColumn()} = auth() -> id();
        }

        $dispatcher = $model -> getEventDispatcher();

        $model -> unsetEventDispatcher();

        $model -> save();

        $model -> setEventDispatcher($dispatcher);
    }
public function handle($model)
    {
        if (! $model -> isUserstamping()) {
            return;
        }

        if (is_null($model -> {$model -> getDeletedByColumn()})) {
            $model -> {$model -> getDeletedByColumn()} = auth() -> id();
        }

        $dispatcher = $model -> getEventDispatcher();

        $model -> unsetEventDispatcher();

        $model -> save();

        $model -> setEventDispatcher($dispatcher);
    }
public function handle ( $ model ) { if ( ! $ model -> isUserstamping ( ) ) { return ; } if ( is_null ( $ model -> { $ model -> getDeletedByColumn ( ) } ) ) { $ model -> { $ model -> getDeletedByColumn ( ) } = auth ( ) -> id ( ) ; } $ dispatcher = $ model -> getEventDispatcher ( ) ; $ model -> unsetEventDispatcher ( ) ; $ model -> save ( ) ; $ model -> setEventDispatcher ( $ dispatcher ) ; }
When the model is being deleted.

@param Illuminate\Database\Eloquent $model
@return void
When the model is being deleted .