appoly/api-password-helper
Composer 安装命令:
composer require appoly/api-password-helper
包简介
Allow the users to request a forgotten password and reset over api requests
README 文档
README
Introduction
Save time creating functions to manage forgotten passwords in laravel for your Api's. This package will add a new key to your users model, along with two new routes that will handle the forgotten and reset password.
Quick Usage
Composer
composer require appoly/api-password-helper
Usage
Add the new key to your users table.
php artisan migrate
The Users Model needs to be Notifiable as an email will be automatically sent to them
class User extends Authenticatable
{
use Notifiable;
Routes
Two new routes will be created in your application
GET: /api/forgot-password?email=johndoe@example.com
The Post route takes two form data parameters in the request key and password.
POST: /api/forgot-password
If your user model has $fillable ensure that password_helper_key is added to the list of fields that are allowed to be updated.
Edit the email
To edit the email you need to publish the config to your project using
php artisan vendor:publish --tag=api-password-helper-config --force
This will add the LaravelApiPasswordHelper file to your config folder, from there you can edit different sections of the email
SmartSchema Compatibility
If you are using SmartSchema to manage your models fillables then add SmartField to your model
class User extends Authenticatable
{
use Notifiable, SmartField;
appoly/api-password-helper 适用场景与选型建议
appoly/api-password-helper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.99k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 03 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 appoly/api-password-helper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 appoly/api-password-helper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-26