Skip to content

Commit 8784966

Browse files
committed
Add any() method to ViewErrorBag
1 parent d5afdae commit 8784966

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Illuminate/Support/ViewErrorBag.php

+10
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ public function count()
7070
return $this->getBag('default')->count();
7171
}
7272

73+
/**
74+
* Determine if the default message bag has any messages.
75+
*
76+
* @return bool
77+
*/
78+
public function any()
79+
{
80+
return $this->count() > 0;
81+
}
82+
7383
/**
7484
* Dynamically call methods on the default bag.
7585
*

0 commit comments

Comments
 (0)