infuse / auth
Infuse 框架的认证模块
3.2
2018-01-01 23:28 UTC
Requires
- php: >=7.0
Requires (Dev)
- infuse/email: ~1.2
- infuse/infuse: ~1.6
- mockery/mockery: ~1.0
- phpunit/php-code-coverage: 5.*
- phpunit/phpunit: 6.0.*
- pulsar/pulsar: ~0.6
- robmorgan/phinx: ~0.8
- satooshi/php-coveralls: ~1.0
Suggests
- ext-redis: *
README
Infuse 框架的认证模块
安装
-
使用 composer 安装此包
composer require infuse/auth
-
将服务添加到应用程序配置中的
services
'services' => [ // ... 'auth' => 'Infuse\Auth\Services\Auth' // ... ]
-
将迁移添加到应用程序配置中
'modules' => [ 'migrations' => [ // ... 'Auth' ], 'migrationPaths' => [ // ... 'Auth' => 'vendor/infuse/auth/src/migrations' ] ]
-
(可选) 将辅助任务的控制台命令添加到应用程序配置中的
console.commands
'console' => [ // ... 'commands' => [ // ... 'Infuse\Auth\Console\ResetPasswordLinkCommand' ] ]
-
(可选) 将垃圾收集计划的作业添加到应用程序配置中的
cron
'cron' => [ // ... [ 'id' => 'auth:garbageCollection', 'class' => 'Infuse\Auth\Jobs\GarbageCollection', 'minute' => 30, 'hour' => 1, 'day' => 1 ] ]
使用方法
您可以为进一步的定制创建自己的用户模型,位于 App\Users\Models\User
。