mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 20:00:27 +08:00
42 lines
952 B
PHP
42 lines
952 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
|
* @license https://opensource.org/licenses/GPL-2.0
|
|
* @link https://www.koogua.com
|
|
*/
|
|
|
|
namespace App\Services\Logic\Help;
|
|
|
|
use App\Models\Help as HelpModel;
|
|
use App\Services\Logic\HelpTrait;
|
|
use App\Services\Logic\Service as LogicService;
|
|
|
|
class HelpInfo extends LogicService
|
|
{
|
|
|
|
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,
|
|
'published' => $help->published,
|
|
'deleted' => $help->deleted,
|
|
'create_time' => $help->create_time,
|
|
'update_time' => $help->update_time,
|
|
];
|
|
}
|
|
|
|
}
|