display all errors at once in laravel
@if($errors->any()) {!! implode('', $errors->all(':message')) !!} @endif
Here is what the above code is Doing:
1. We’re using the @if directive to check if there are any errors.
2. If there are errors, we’re using the @implode directive to join all the errors together.
3. We’re using the @all directive to get all the errors.
4. We’re using the @message directive to get the error message.
5. We’re wrapping the error message in a div tag.
Now, let’s add the following code to the end of the file: