protected function restore(User $user, Model $model)
    {
        if (
            $this->isUsingSoftDeletes($model) &&
            $model->trashed() &&
            $user->isEnabled()
        ) {
            // If the model has soft-deletes enabled, the model is
            // currently deleted, and the LDAP user account
            // is enabled, we'll restore the users model.
            $model->restore();

            if ($this->isLogging()) {
                $type = get_class($user->getSchema());

                logger()->info("Restored user {$user->getCommonName()}. Their {$type} user account has been re-enabled.");
            }
        }
    }
protected function restore(User $user, Model $model)
    {
        if (
            $this->isUsingSoftDeletes($model) &&
            $model->trashed() &&
            $user->isEnabled()
        ) {
            // If the model has soft-deletes enabled, the model is
            // currently deleted, and the LDAP user account
            // is enabled, we'll restore the users model.
            $model->restore();

            if ($this->isLogging()) {
                $type = get_class($user->getSchema());

                logger()->info("Restored user {$user->getCommonName()}. Their {$type} user account has been re-enabled.");
            }
        }
    }
protected function restore ( User $ user , Model $ model ) { if ( $ this -> isUsingSoftDeletes ( $ model ) && $ model -> trashed ( ) && $ user -> isEnabled ( ) ) { // If the model has soft-deletes enabled, the model is // currently deleted, and the LDAP user account // is enabled, we'll restore the users model. $ model -> restore ( ) ; if ( $ this -> isLogging ( ) ) { $ type = get_class ( $ user -> getSchema ( ) ) ; logger ( ) -> info ( "Restored user {$user->getCommonName()}. Their {$type} user account has been re-enabled." ) ; } } }
Restores soft-deleted models if their LDAP account is enabled.

@param User  $user
@param Model $model

@return void
Restores soft - deleted models if their LDAP account is enabled .