php - Laravel 5.4 Auth Change table for all Auth processes -


i have created custom login (not using default laravel auth) business design forced reason need adjust. there way auth procedures (checking session, login, logout, etc..) table? google research points me config/auth.php change table value there when opened it, there no 'table' value in config added manually

'table' => 'user_admin', 

..unfortunately, nothing has changed. session checking still checks in users table.

thanks inputs.

go to

config/auth.php

    /* |-------------------------------------------------------------------------- | user providers |-------------------------------------------------------------------------- | | authentication drivers have user provider. defines how | users retrieved out of database or other storage | mechanisms used application persist user's data. | | if have multiple user tables or models may configure multiple | sources represent each model / table. these sources may | assigned authentication guards have defined. | | supported: "database", "eloquent" | */  'providers' => [     'users' => [         'driver' => 'eloquent',         'model' => app\user::class,     ],      // 'users' => [     //     'driver' => 'database',     //     'table' => 'users',     // ], ], 

you'll maybe need modify validator method in registercontroller

you can change table name in migration file , change table name variable in user.php model.

example:

   class mytable extends model     {         /**          * table associated model.          *          * @var string          */         protected $table = 'my_table';     } 

https://laravel.com/docs/5.4/eloquent#eloquent-model-conventions


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -