stormcode/multi-login-methods
最新稳定版本:1.4.2
Composer 安装命令:
composer require stormcode/multi-login-methods
包简介
Simple package that allows to make classes for multiple login methods
README 文档
README
Installation
Install through Composer:
composer require stormcode/multi-login-methods
Add trait to your User model:
use StormCode\MultiLoginMethods\Traits\MultipleLoginMethods
Publish config, migration and view:
php artisan vendor:publish --provider=StormCode\MultiLoginMethods\MultiLoginMethodsServiceProvider
Migrate database:
php artisan migrate
Configuration
Whole configuration can be done trough the config file config/multiLoginMethods.php:
<?php return [ /** * Allowed login methods */ 'enabled_login_methods' => [ StormCode\MultiLoginMethods\LoginMethods\EmailLogin::class, StormCode\MultiLoginMethods\LoginMethods\PasswordLogin::class, //StormCode\MultiLoginMethods\LoginMethods\SMSLogin::class ], /** * Drivers used to send emails, phones or other */ 'send_drivers' => [ StormCode\MultiLoginMethods\LoginMethods\EmailLogin::class => \StormCode\MultiLoginMethods\SendDrivers\EmailDriver::class, //StormCode\MultiLoginMethods\LoginMethods\SMSLogin::class ], /** * User model settings */ 'auth_model' => \App\Models\User::class, 'auth_model_table' => 'users', /** * Max and minimum number of numbers in code sent to email or phone */ 'minCodeLength' => 6, 'maxCodeLength' => 6, /** * Allowed attempts count, after which login attempt will be blocked */ 'max_attempts' => 3, ];
统计信息
- 总下载量: 450
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-22