public function first($key = null, $format = null)
	{
		$format = ($format === null) ? $this->format : $format;

		$messages = is_null($key) ? $this->all($format) : $this->get($key, $format);

		return (count($messages) > 0) ? $messages[0] : '';
	}
public function first($key = null, $format = null)
	{
		$format = ($format === null) ? $this->format : $format;

		$messages = is_null($key) ? $this->all($format) : $this->get($key, $format);

		return (count($messages) > 0) ? $messages[0] : '';
	}
public function first ( $ key = null , $ format = null ) { $ format = ( $ format === null ) ? $ this -> format : $ format ; $ messages = is_null ( $ key ) ? $ this -> all ( $ format ) : $ this -> get ( $ key , $ format ) ; return ( count ( $ messages ) > 0 ) ? $ messages [ 0 ] : '' ; }
Get the first message from the container for a given key.

<code>
// Echo the first message out of all messages.
echo $messages->first();

// Echo the first message for the e-mail attribute
echo $messages->first('email');

// Format the first message for the e-mail attribute
echo $messages->first('email', '<p>:message</p>');
</code>

@param  string  $key
@param  string  $format
@return string
Get the first message from the container for a given key .