original_string: public function first($key = null, $format = null)
      {
          $messages = is_null($key) ? $this->all($format) : $this->get($key, $format);
  
          $firstMessage = Arr::first($messages, null, '');
  
          return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage;
      }
code: public function first($key = null, $format = null)
      {
          $messages = is_null($key) ? $this->all($format) : $this->get($key, $format);
  
          $firstMessage = Arr::first($messages, null, '');
  
          return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage;
      }
code_tokens: public function first ( $ key = null , $ format = null ) { $ messages = is_null ( $ key ) ? $ this -> all ( $ format ) : $ this -> get ( $ key , $ format ) ; $ firstMessage = Arr :: first ( $ messages , null , '' ) ; return is_array ( $ firstMessage ) ? Arr :: first ( $ firstMessage ) : $ firstMessage ; }
docstring: Get the first message from the message bag for a given key.
  
  @param  string  $key
  @param  string  $format
  @return string
docstring_tokens: Get the first message from the message bag for a given key .