visanduma / laravel-auth-switch
为开发环境提供的简单用户切换
v0.1.1
2022-05-18 07:28 UTC
Requires
- php: ^7.3|^8.0
- illuminate/contracts: ^8.73
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^5.10
- orchestra/testbench: ^6.22
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
README
为开发环境提供的简单用户切换
安装
您可以通过 composer 安装此包
composer require visanduma/laravel-auth-switch
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="auth-switch-config"
这是发布配置文件的内容
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' => 'alexie.runolfsson@example.org', 'redirect_to' => 'affiliate/dashboard' // redirect to this url after login ], [ 'name' => 'Broker', 'username' => 'dojyxisero@mailinator.com', 'redirect_to' => 'brokers/dashboard' ], ];
使用方法
在需要 Auth Switching 的任何视图中包含
@include('auth-switch::button');
更新日志
请参阅 更新日志 了解最近更改的详细信息。
贡献
请参阅 贡献指南 了解详细信息。
安全漏洞
请查阅 我们的安全策略 了解如何报告安全漏洞。
致谢
许可证
MIT 许可证(MIT)。请参阅 许可证文件 了解更多信息。