Laravel 5.2 Include Field for Authentication

Asked

Viewed 379 times

1

Good afternoon, I would like a light to change the way Laravel performs authentication, I added a column (login) in the users table I would like to know how to do instead of authenticating with the columns email and password I use the columns login and password. Anyone can help?

  • has a look: in this example:http://answall.com/questions/148446/authenticate%C3%A7%C3%A3o-costumizada-com-Cpf-e-email/151477#151477

1 answer

-1


In the model User.php, change the row below with the columns you want:

protected $fillable = ['nome', 'email', 'password'];

Being email and password responsible for login on the system.

  • then, what I want is precisely that the fields responsible for the login are other, in my case I would change the field email for loginUsuario for example

  • All right, follow the instructions ?

  • yes.. I also changed my login.blade.php com, where it was email placed login but when logging in it does nothing, back to same login screen

Browser other questions tagged

You are not signed in. Login or sign up in order to post.