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;
    }
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;
    }
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 ; }
Get the first message from the message bag for a given key.

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