0

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

Community
  • 1
  • 1
Mudassir
  • 37
  • 9

2 Answers2

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,
        ]
    ],
Mudassir
  • 37
  • 9
0

i copy default auth two files to the new companyauth . and define protected $redirectTo = 'company-home'; protected $guard = 'company';

Mudassir
  • 37
  • 9