Laravel multi auth - Authentication user provider [] is not defined



PHP Snippet 1:

php artisan make:provider MerchantServiceProvider

PHP Snippet 2:

'providers' => [ App\Providers\RouteServiceProvider::class ]

PHP Snippet 3:

    'providers' => [
            'users' => [
                'driver' => 'eloquent',
/*change this ---->*/ 'model' => App\<modelclassname>::class,
            ],

PHP Snippet 4:

protected $table = 'merchant';  // ----> this is your table name

PHP Snippet 5:

'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Users::class,
        ],
        'merchant' => [
            'driver' => 'eloquent',
            'model' => App\Merchant::class,
        ],
    ],

PHP Snippet 6:

    'branchs' => [
        'driver' => 'database',
        'provider' => 'merchants',

    ],