Created
March 2, 2015 12:08
-
-
Save samcrosoft/1cb6d441782864dbe207 to your computer and use it in GitHub Desktop.
A quick snippet to use a condition to bind the display of all errors in a laravel blade view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if($errors->has()) | |
@foreach ($errors->all() as $error) | |
<p class="error">{!! $error !!}</p> | |
@endforeach | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Laravel 5.5 with PHP 7.* I get this error:
You must pass an empty array in has() function: