original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Restore the trashed user.
  
  @param  \Arcanesoft\Contracts\Auth\Models\User  $user
  
  @return \Illuminate\Http\JsonResponse
docstring_tokens: Restore the trashed user .