jncinet/qihucms-site-help
Composer 安装命令:
composer require jncinet/qihucms-site-help
包简介
qihucms site help.
README 文档
README
$ composer require jncinet/qihucms-site-help
使用
数据迁移
$ php artisan migrate
发布资源
$ php artisan vendor:publish --provider="Qihucms\SiteHelp\SiteHelpServiceProvider"
后台菜单
- 帮助分类:site-help/help-categories
- 帮助内容:site-help/helps
- 帮助回复:site-help/help-replies
接口
选择帮助文档
- 请求方式:GET
- 请求地址:site-help/select-helps?q=文档关键词
- 返回值:
[
{
"id": 1,
"text" "文档标题"
},
...
]
帮助文档分类列表
- 请求方式:GET
- 请求地址:site-help/help-categories
- 返回值:
[
{
'id': 1,
'name': "分类名",
'ico': "http://图片地址",
'desc': "分类简介",
},
...
]
帮助文档详细
- 请求方式:GET
- 请求地址:site-help/help-categories/{id={帮助分类ID}
- 返回值:
{
'id': 1,
'name': "分类名",
'ico': "http://图片地址",
'desc': "分类简介",
}
帮助文档分页列表
- 请求方式:GET
- 请求地址:site-help/helps?id={帮助分类ID,默认为0读取所的文档}&limit={分页条数,可选}&page={页码,可选}
- 返回值:
{
"data": [
{
'id': 1,
'category': {
'id': 1,
'name': "分类名",
'ico': "http://图片地址",
'desc': "分类简介",
},
'title': "标题",
'desc': "简介",
'thumbnail': "缩略图",
'useful': 142, // 有用数
'created_at': "3秒前",
'updated_at': "1秒前",
},
...
],
"meta": {},
"links": {}
}
帮助文档详细
- 请求方式:GET
- 请求地址:site-help/helps/{id={帮助文档ID}
- 返回值:
{
'id': 1,
'category': {
'id': 1,
'name': "分类名",
'ico': "http://图片地址",
'desc': "分类简介",
},
'replies': [
{
'id': 1,
'user': {"id": 1, "username": "name", ...},
'content': "评论回复",
'reply': "回复内容",
'created_at': "1小时前",
'updated_at': "1分钟前",
},
...
]
'title': "标题",
'desc': "概述",
'thumbnail': "缩略图地址"
'content': "帮助文档内容"
'useful': 112, // 有用数
'created_at' "1小时前",
'updated_at': "1分钟前",
}
会员回复列表
请求:GET
地址:/site-help/help-replies?page={$page}&limit={$limit}
参数:
int $page (选填)页码
int $limit (选填)每页显示的条数
返回值:
{
"data": [
{
'id' => 1,
'help' => {帮助文档详细},
'content' => "评论回复",
'reply' => "回复内容",
'created_at' => "3天前"
'updated_at' => "3天前",
},
...
],
"meta": {...},
"links": {...}
}
添加回复
请求:POST
地址:/site-help/help-replies
参数:
{
"site_help_id":1 // 文档ID
"content":'评论内容'
}
返回值:
{
'id' => 1,
'user' => {会员资料},
'content' => "评论回复",
'reply' => "回复内容",
'created_at' => "3天前"
'updated_at' => "3天前",
}
更新回复
请求:PATCH|PUT 地址:/site-help/help-replies/{id} 参数: { "site_help_id":1 // 内容ID "content":'评论内容' } 返回值: { status: 'SUCCESS', result: { id: 1 } }
删除回复
请求:DELETE
地址:/site-help/help-replies/{id}
返回值:
{
status: 'SUCCESS',
result: {
id: 1
}
}
数据库
帮助分类表:site_help_categories
| Field | Type | Length | AllowNull | Default | Comment |
|---|---|---|---|---|---|
| id | bigint | ||||
| name | varchar | 55 | 分类名称 | ||
| desc | varchar | 255 | Y | NULL | 分类介绍 |
| ico | varchar | 255 | Y | NULL | 小图标 |
| sort | int | 0 | 分类排序 | ||
| status | tinyint | 1 | 分类状态 | ||
| created_at | timestamp | Y | NULL | 创建时间 | |
| updated_at | timestamp | Y | NULL | 更新时间 |
帮助内容表:site_helps
| Field | Type | Length | AllowNull | Default | Comment |
|---|---|---|---|---|---|
| id | bigint | ||||
| site_help_category_id | bigint | 所属分类 | |||
| title | varchar | 255 | 标题 | ||
| desc | varchar | 255 | Y | NULL | 概要 |
| thumbnail | varchar | 255 | Y | NULL | 缩略图 |
| content | longtext | 内容 | |||
| useful | int | 0 | 有用 | ||
| status | tinyint | 1 | 状态 | ||
| created_at | timestamp | Y | NULL | 创建时间 | |
| updated_at | timestamp | Y | NULL | 更新时间 |
帮助回复表:site_help_replies
| Field | Type | Length | AllowNull | Default | Comment |
|---|---|---|---|---|---|
| id | bigint | ||||
| site_help_id | bigint | 所属内容 | |||
| user_id | bigint | 发布人 | |||
| content | text | 评论内容 | |||
| reply | text | 回复内容 | |||
| status | tinyint | 1 | 状态 | ||
| created_at | timestamp | Y | NULL | 创建时间 | |
| updated_at | timestamp | Y | NULL | 更新时间 |
jncinet/qihucms-site-help 适用场景与选型建议
jncinet/qihucms-site-help 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 11 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「site」 「help」 「qihucms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jncinet/qihucms-site-help 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jncinet/qihucms-site-help 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jncinet/qihucms-site-help 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Frequently Asked Questions (FAQ) plugin. With categories, on-the-fly search, customer helpfulness tracking and comments.
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
404 'not found' and 403 'forbidden' error handlers. The 404 handler shows custom content for missing pages but not resources like CSS or JS. The 403 handler redirects to a login URL on unauthorized access.
A wrapper for silverstripe/docsviewer that pulls the documentation into the CMS adding a Site Help option to the help menu.
Define useful links to be added to the dashboard for clients.
A set of tools to speed up the process of coding
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-17