src/Http/Controllers/Admin/UsersController.php
public function restore(User $user)
    {
        $this->authorize(UsersPolicy::PERMISSION_UPDATE);

        try {
            $user->restore();

            $message = $this->transNotification('restored', ['name' => $user->full_name], $user->toArray());

            return $this->jsonResponseSuccess(compact('message'));
        }
        catch (\Exception $e) {
            return $this->jsonResponseError(['message' => $e->getMessage()], 500);
        }
    }
public function restore(User $user)
    {
        $this->authorize(UsersPolicy::PERMISSION_UPDATE);

        try {
            $user->restore();

            $message = $this->transNotification('restored', ['name' => $user->full_name], $user->toArray());

            return $this->jsonResponseSuccess(compact('message'));
        }
        catch (\Exception $e) {
            return $this->jsonResponseError(['message' => $e->getMessage()], 500);
        }
    }
public function restore ( User $ user ) { $ this -> authorize ( UsersPolicy :: PERMISSION_UPDATE ) ; try { $ user -> restore ( ) ; $ message = $ this -> transNotification ( 'restored' , [ 'name' => $ user -> full_name ] , $ user -> toArray ( ) ) ; return $ this -> jsonResponseSuccess ( compact ( 'message' ) ) ; } catch ( \ Exception $ e ) { return $ this -> jsonResponseError ( [ 'message' => $ e -> getMessage ( ) ] , 500 ) ; } }
Restore the trashed user.

@param  \Arcanesoft\Contracts\Auth\Models\User  $user

@return \Illuminate\Http\JsonResponse
Restore the trashed user .