Simple User switch for development environment
You can install the package via composer:
composer require visanduma/laravel-auth-switch
You can publish the config file with:
php artisan vendor:publish --tag="auth-switch-config"
This is the contents of the published config file:
return [
// username column of user table
'username_column' => 'email',
// auth able user model
'model' => \App\Models\User::class,
// switch able user accounts according to your user table
'accounts' => [
[
'name' => 'Affiliate',
'username' => '[email protected]',
'redirect_to' => 'affiliate/dashboard' // redirect to this url after login
],
[
'name' => 'Broker',
'username' => '[email protected]',
'redirect_to' => 'brokers/dashboard'
],
];
Include into any view where you need Auth Switching
@include('auth-switch::button');
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.