Commit 89b5ad03 authored by Taylor Otwell's avatar Taylor Otwell

Added format parameter to Error->first method.

parent 539eb28c
......@@ -52,11 +52,12 @@ class Errors {
* Get the first error message for an attribute.
*
* @param string $attribute
* @param string $format
* @return string
*/
public function first($attribute)
public function first($attribute, $format = ':message')
{
return (count($messages = $this->get($attribute)) > 0) ? $messages[0] : '';
return (count($messages = $this->get($attribute, $format)) > 0) ? $messages[0] : '';
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment