jimbo
jimbo

Reputation: 109

Laravel Auth change table name

So I have generated Laravel's authentication code using

php artisan make:auth

But I'd like to change the table name in the database to accounts rather than users. I already changed it in the migrations, user model and config/auth.php but it still looks for 'users' table in the database when I try to register/login. I've searched for a solution, but that is all everyone is suggesting. (BTW I already have a table called 'users' that has other data in it)

Anything else I need to change?

Upvotes: 0

Views: 578

Answers (1)

scrubmx
scrubmx

Reputation: 2556

Seems like is the validation trying to check if the email exists in the users table.

Change your validation to this:

'email' => 'required|email|unique:accounts'

Upvotes: 2

Related Questions