diff --git a/laravel/messages.php b/laravel/messages.php index 583a6e44..5ca75a6a 100644 --- a/laravel/messages.php +++ b/laravel/messages.php @@ -52,10 +52,18 @@ protected function unique($key, $message) /** * Determine if messages exist for a given key. * + * + * // Is there a message for the e-mail attribute + * return $messages->has('email'); + * + * // Is there a message for the any attribute + * echo $messages->has(); + * + * * @param string $key * @return bool */ - public function has($key) + public function has($key = null) { return $this->first($key) !== ''; }