original_string: public function withError($title = '', $message = '')
      {
          $error = new MessageBag(compact('title', 'message'));
  
          session()->flash('error', $error);
  
          return $this;
      }
code: public function withError($title = '', $message = '')
      {
          $error = new MessageBag(compact('title', 'message'));
  
          session()->flash('error', $error);
  
          return $this;
      }
code_tokens: public function withError ( $ title = '' , $ message = '' ) { $ error = new MessageBag ( compact ( 'title' , 'message' ) ) ; session ( ) -> flash ( 'error' , $ error ) ; return $ this ; }
docstring: Set error message for content.
  
  @param string $title
  @param string $message
  
  @return $this
docstring_tokens: Set error message for content .