This question related to article Laravel 5.4: Login with Username or Email. There, it was suggested the next method of custom authentication:
protected function credentials(Request $request){
$field = filter_var($request->get($this->username()), FILTER_VALIDATE_EMAIL)
? $this->username()
: 'username';
return [
$field => $request->get($this->username()),
'password' => $request->password,
];
}
What means '->password' in $request->password
? Field's name
attribute? What if my password field's name
is passoword1
, for example?
<input type="password" name="password1" required>