Laravel 5.1 Custom table names and field names

- 1 answer

Ad

I am using a already setup database to upgrade an old application to Laravel 5.1 and using out-of-the box authentication system (built-in). The registration/login works only when I use email and password as field name, otherwise it let the user register but not let them login. My question is can we use own filed names?

Ad

Answer

Ad

I believe you need to change the migrations & User Model's $fillable property... AuthController and Illuminate\Foundation\Auth\AuthenticatesUserspostLogin and loginUsername methods

Ad
source: stackoverflow.com
Ad