lcharette/uf_userprofile
Composer 安装命令:
composer require lcharette/uf_userprofile
包简介
Custom Profile Fields for UserFrosting V4
README 文档
README
This Sprinkle makes it easy to add any custom fields to the user or group model. Simply create a new schema in you own sprinkle and you're done. Your new profile fields will be automatically integrated in the default UserFrosting interface.
Help and Contributing
If you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the UserFrosting Chat most of the time for direct support.
Installation
Edit UserFrosting app/sprinkles.json file and add the following to the require list : "lcharette/uf_userprofile": "^3.0.0". Also add FormGenerator and UserProfile to the base list. For example:
{
"require": {
"lcharette/uf_userprofile": "^3.0.0"
},
"base": [
"core",
"account",
"admin",
"FormGenerator",
"UserProfile"
]
}
Run composer update then php bakery bake to install the sprinkle.
Usage
To add a custom profile fields to any user, you simply add a FormGenerator compliant schema containing the form key as well as the traditional validation schema. The rest is generated by this Sprinkle.
For example, you can add the following to a schema/userProfile/myFields.json file inside your sprinkle to add a location, occupation and gender user field. With the associated locale keys, that's all you have to do to add a new user field to your UserFrosting setup.
{
"location" : {
"validators" : {
"length" : {
"label" : "LOCATION",
"min" : 1,
"max" : 255,
"message" : "VALIDATE.LENGTH_RANGE"
}
},
"form": {
"type": "text",
"label": "LOCATION",
"icon": "fa-globe"
}
},
"occupation" : {
"validators" : {
"length" : {
"label" : "OCCUPATION",
"min" : 1,
"max" : 255,
"message" : "VALIDATE.LENGTH_RANGE"
}
},
"form": {
"type": "textarea",
"label": "OCCUPATION",
"icon": "fa-briefcase"
}
},
"gender" : {
"validators" : {},
"form": {
"type": "select",
"label": "GENDER",
"icon": "fa-transgender",
"options" : {
"1" : "GENDER.MALE",
"2" : "GENDER.FEMALE",
"3" : "GENDER.NEUTRAL"
}
}
}
}
Note that the schema must be saved inside the schema/userProfile/ directory of your sprinkle to be picked up automatically by the system. You might also want to run php bakery clear-cache command from the UserFrosting root since those fields are stored in cache for better performances.
You can also specify groups custom fields by saving any schema in the the schema/groupProfile/ directory of your sprinkle.
Screenshots
License
By Louis Charette. Copyright (c) 2020, free to use in personal and commercial software as per the MIT license.
lcharette/uf_userprofile 适用场景与选型建议
lcharette/uf_userprofile 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 824 次下载、GitHub Stars 达 8, 最近一次更新时间为 2017 年 05 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「profile」 「userfrosting」 「Sprinkle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lcharette/uf_userprofile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lcharette/uf_userprofile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lcharette/uf_userprofile 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Core module for UserFrosting.
Authentication and account management module for UserFrosting.
Administrative management module for UserFrosting.
A secure, modern user management system for PHP.
Form generator for UserFrosting V5
A module for Pluf to manage user profiles and user accounts
统计信息
- 总下载量: 824
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-21

