F
F
freestm2016-08-11 23:45:49
Laravel
freestm, 2016-08-11 23:45:49

Explain a couple of lines on Laravel?

Here are the sources of a simple authorization example link to GitHub
This code is not clear

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

It is clear that it says "if there is an error in the email, then the signage is an error", but I can not structure the location. If you enter incorrect data, it writes "These credentials do not match our records." below the email field. Where can I edit this caption? Where are the files and functions of this code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kislenko, 2016-08-12
@webwork

The $errors variable is most likely a variable from the validate method ( https://laravel.com/docs/5.2/validation#error-mess...
It gets into the view in different ways, for example, like this: stackoverflow.com/questions/19838978/ laravel-redir...
The answer from the link above uses a similar example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question