diff --git a/src/Illuminate/Support/ViewErrorBag.php b/src/Illuminate/Support/ViewErrorBag.php index 9bf776a0019b..ccc790d94f9b 100644 --- a/src/Illuminate/Support/ViewErrorBag.php +++ b/src/Illuminate/Support/ViewErrorBag.php @@ -70,6 +70,16 @@ public function count() return $this->getBag('default')->count(); } + /** + * Determine if the default message bag has any messages. + * + * @return bool + */ + public function any() + { + return $this->count() > 0; + } + /** * Dynamically call methods on the default bag. *