mercredi 27 avril 2016

Laravel 5 : Login page doesn't show error messages when wrong email/password were entered

I'm trying to use the built-in authentication. The problem I've been facing is that I can't see any error message when the user entered wrong information.

 <form class="form-horizontal" role="form" method="POST" action="">
            {!! csrf_field() !!}
            
     <div class="form-group">
            <label>E-Mail Address</label>
            <div>
                <input type="email" class="form-control" name="email" value="">

                @if ($errors->has('email'))
                <span class="help-block">
                    <strong></strong>
                </span>
                @endif
            </div>

//Here are other <div> tags

     </div>                
 </form>

This was automatically generated by Laravel's authentication scaffolding. If the email address was wrong, there is supposed to be a message. I don't see the message if the email address was wrong, so I put to see the contents of $errors. The result is...

object(Illuminate\Support\ViewErrorBag)#177 (1) { ["bags":protected]=> array(0) { } }

I'm reading the Laravel's documentation, but can't find why this array contains nothing all the time.

I'd appreciate if you would give any advice.



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

Aucun commentaire:

Enregistrer un commentaire