mardi 5 janvier 2016

ErrorException when using $errors in view in Laravel 5

I have the following code in my view

@if ($errors->any())
    <ul class="alert alert-danger">
    @foreach ($errors->all() as $error)
        <li>{{ $error }}</li>
    @endforeach
    </ul>
@endif

I expect $errors to be available to my view, so I want to display them

However, this block throws the following exception :

ErrorException in 958ab466b0f563093a9e18c3ff070466cc69459a.php line 38: Undefined variable: errors (View: .....filename.blade.php



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1OIHDf2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire