Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 1, 2017
Merged

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

merged 1 commit into from
Mar 1, 2017

Conversation

jerguslejko
Copy link
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