I've created a new table called "admins" table. I want to use this instead of the users table.
I've already added this in my User model:
protected $table = 'admins';
And I also tried this on my auth.php:
'users' => [
'driver' => 'database',
'table' => 'admins',
],
But none of them worked. Are there any other solutions that could work?
For one, you must also change the RegisterController
, in it you will find the create
method:
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
As you can see it too uses the User
model.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments