original_string: public function delete(LogsListener $listener, $id = null): RedirectResponse
      {
          $stack = !empty($ids   = input('attr')) ? $this->stack->newQuery()->whereIn('id', $ids) : $this->stack->newQuery()->findOrFail($id);
          if ($stack->delete()) {
              return $listener->deleteSuccess();
          }
          return $listener->deleteFailed();
      }
code: public function delete(LogsListener $listener, $id = null): RedirectResponse
      {
          $stack = !empty($ids   = input('attr')) ? $this->stack->newQuery()->whereIn('id', $ids) : $this->stack->newQuery()->findOrFail($id);
          if ($stack->delete()) {
              return $listener->deleteSuccess();
          }
          return $listener->deleteFailed();
      }
code_tokens: public function delete ( LogsListener $ listener , $ id = null ) : RedirectResponse { $ stack = ! empty ( $ ids = input ( 'attr' ) ) ? $ this -> stack -> newQuery ( ) -> whereIn ( 'id' , $ ids ) : $ this -> stack -> newQuery ( ) -> findOrFail ( $ id ) ; if ( $ stack -> delete ( ) ) { return $ listener -> deleteSuccess ( ) ; } return $ listener -> deleteFailed ( ) ; }
docstring: Deletes notification log
  
  @param LogsListener $listener
  @param mixed $id
  @return RedirectResponse
docstring_tokens: Deletes notification log