Skip to content

[5.4] Add any() method to ViewErrorBag#18176

Merged
taylorotwell merged 1 commit intolaravel:5.4from
jerguslejko:5.4
Mar 1, 2017
Merged

[5.4] Add any() method to ViewErrorBag#18176
taylorotwell merged 1 commit intolaravel:5.4from
jerguslejko:5.4

Conversation

@jerguslejko
Copy link
Copy Markdown
Contributor

This PR introduces new any() method to ViewErrorBag class.

This method can be used in views to determine whether the bag contains any errors. Please consider following:

@if ($errors->count() > 0)

// vs

@if ($errors->any())

The name any() aligns nicely with Illuminate\Support\MessageBag::any().

🌵

@jerguslejko jerguslejko changed the title Add any() method to ViewErrorBag [5.4] Add any() method to ViewErrorBag Mar 1, 2017
@taylorotwell taylorotwell merged commit 8784966 into laravel:5.4 Mar 1, 2017
@jerguslejko jerguslejko deleted the 5.4 branch March 1, 2017 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants