Answer the question
In order to leave comments, you need to log in
How to change the field by which authorization will occur?
Changed email to login in lodin.blade file
<div class="form-group row">
<label for="login" class="col-md-4 col-form-label text-md-right">{{ __(' login') }}</label>
<div class="col-md-6">
<input id="login" type="text" class="form-control{{ $errors->has('login') ? ' is-invalid' : '' }}" name="login" value="{{ old('login') }}" required autofocus>
@if ($errors->has('login'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('login') }}</strong>
</span>
@endif
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Redefine the function in the LoginController file:
public function username()
{
return 'login';
}
I changed the function in the AuthenticatesUsers file, you can access this file by following the chain from LoginController, it contains a link to this file.
did this:
public function username()
{
return 'login';
}
Found still the second method. If anyone is interested. Although the first method works and was originally provided by laravel developers, it is really clumsily done in the sense that the function was not located immediately after the login function, so that it would be more clear why it exists.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question