Skip to content

Commit

Permalink
[5.5] Implement __toString on ViewErrorBag (#21605)
Browse files Browse the repository at this point in the history
* Implement __toString on ViewErrorBag

* (style fix)
  • Loading branch information
alepeino authored and taylorotwell committed Oct 10, 2017
1 parent b95ba6a commit ddd1124
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ViewErrorBag.php
Expand Up @@ -117,4 +117,14 @@ public function __set($key, $value)
{
$this->put($key, $value);
}

/**
* Convert the default bag to its string representation.
*
* @return string
*/
public function __toString()
{
return (string) $this->getBag('default');
}
}

0 comments on commit ddd1124

Please sign in to comment.