Y.elinx Y.elinx - 3 months ago 14
PHP Question

laravel5.2 auth register the users table not found

I change Laravel 5.2.43 Auth default users table to

user_list
and also set this code in the user model.

protected $table = 'user_list';


Then I visited
/register
but it give me an error (see image below). It is strange that I create a blank table users, it run normal, data insert into the
user_list
table.


QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table
haveteer.users
doesn't exists.

SQL:

select count(*) as aggregate from 'users' where 'email" == walle@qq.com



the error

Answer
protected function validator(array $data)

Find this function. In there you should change users to user_list

Example

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

should become

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