mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-25 12:09:09 +08:00
* 更换README.md中的简书图床为gitee本地 * 修复编辑器图片上传,增加上传文件身份认证,markdown内容解析 * 移除Mobile模块,修复API请求章节信息权限问题
35 lines
686 B
PHP
35 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Services\Logic\Help;
|
|
|
|
use App\Models\Help as HelpModel;
|
|
use App\Services\Logic\HelpTrait;
|
|
use App\Services\Logic\Service;
|
|
|
|
class HelpInfo extends Service
|
|
{
|
|
|
|
use HelpTrait;
|
|
|
|
public function handle($id)
|
|
{
|
|
$help = $this->checkHelp($id);
|
|
|
|
return $this->handleHelp($help);
|
|
}
|
|
|
|
protected function handleHelp(HelpModel $help)
|
|
{
|
|
$help->content = kg_parse_markdown($help->content);
|
|
|
|
return [
|
|
'id' => $help->id,
|
|
'title' => $help->title,
|
|
'content' => $help->content,
|
|
'create_time' => $help->create_time,
|
|
'update_time' => $help->update_time,
|
|
];
|
|
}
|
|
|
|
}
|