Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.42 KB

README.md

File metadata and controls

79 lines (53 loc) · 2.42 KB

Laravel Auth Switch

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Simple User switch for development environment

Installation

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'
        ],
];

Usage

Include into any view where you need Auth Switching

@include('auth-switch::button');

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.