i have change my code according to the given link change my code according the link instruction but they used two login form i want to use single login form for authenticate two users table is there any idea. kindly help
Asked
Active
Viewed 17 times
2 Answers
0
auth.php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
'company' =>[
'driver'=>'session',
'provider' => 'company'
]
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
'company' =>[
'driver' => 'eloquent',
'model' => 'App\Http\Models\company::class',
],
],
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
],
'companies'=>[
'provider' => 'company',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
]
],
![](../../users/profiles/6248346.webp)
Mudassir
- 37
- 9
0
i copy default auth two files to the new companyauth . and define protected $redirectTo = 'company-home'; protected $guard = 'company';
![](../../users/profiles/6248346.webp)
Mudassir
- 37
- 9