How can I change the users table in Laravel?

I am using Laravel 5.0.

I have a table user

in my DB.

I changed the table variables in user

and Config/Auth

out user

, but when I try to register Laravel I get the error:

Table 'xxxx.crmx_users' doesn't exist (SQL: select count(*) as aggregate from `xxxx` where `email` = xxx

      

How am I wrong? Why is Laravel still looking for a table userS

?

+3


source to share


1 answer


Go to app\Services\Registrar.php

file and in validator()

.

public function validator(array $data)
    {
        return Validator::make($data, [
            'name' => 'required|max:255',
            'email' => 'required|email|max:255|unique:users',
            'password' => 'required|confirmed|min:6',
        ]);
    }

      

Change



'email' => 'required|email|max:255|unique:YOUR_TABLE_NAME',

      

I believe this will solve your problem.

+8


source







All Articles