original_string: public function delete()
      {
          try {
              if (is_null($id = Input::get('id'))) {
                  throw new Exception('Invalid notification id provided');
              }
              $this->stack->deleteById($id);
          } catch (Exception $ex) {
              Log::alert($ex);
              return new JsonResponse(['message' => trans('antares/notifications::messages.sidebar.unable_to_delete_notification_item')], 500);
          }
      }
code: public function delete()
      {
          try {
              if (is_null($id = Input::get('id'))) {
                  throw new Exception('Invalid notification id provided');
              }
              $this->stack->deleteById($id);
          } catch (Exception $ex) {
              Log::alert($ex);
              return new JsonResponse(['message' => trans('antares/notifications::messages.sidebar.unable_to_delete_notification_item')], 500);
          }
      }
code_tokens: public function delete ( ) { try { if ( is_null ( $ id = Input :: get ( 'id' ) ) ) { throw new Exception ( 'Invalid notification id provided' ) ; } $ this -> stack -> deleteById ( $ id ) ; } catch ( Exception $ ex ) { Log :: alert ( $ ex ) ; return new JsonResponse ( [ 'message' => trans ( 'antares/notifications::messages.sidebar.unable_to_delete_notification_item' ) ] , 500 ) ; } }
docstring: Deletes item from sidebar
  
  @return JsonResponse
docstring_tokens: Deletes item from sidebar