go to
config/auth.php
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
You'll maybe also need to modify the validator method in the RegisterController
You can change the table name in the migration file and then change the table name variable in the User.php model.
Example:
class MyTable extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'my_table';
}
https://laravel.com/docs/5.4/eloquent#eloquent-model-conventions
protected $table = 'user_admin';
as web guard usesusers
as provider andusers
provider have User as model class – programmingArrow