mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 03:50:56 +08:00
31 lines
543 B
PHP
31 lines
543 B
PHP
<?php
|
|
|
|
namespace App\Services\Logic\Topic;
|
|
|
|
use App\Models\Topic as TopicModel;
|
|
use App\Services\Logic\Service;
|
|
use App\Services\Logic\TopicTrait;
|
|
|
|
class TopicInfo extends Service
|
|
{
|
|
|
|
use TopicTrait;
|
|
|
|
public function handle($id)
|
|
{
|
|
$topic = $this->checkTopic($id);
|
|
|
|
return $this->handleTopic($topic);
|
|
}
|
|
|
|
protected function handleTopic(TopicModel $topic)
|
|
{
|
|
return [
|
|
'id' => $topic->id,
|
|
'title' => $topic->title,
|
|
'summary' => $topic->summary,
|
|
];
|
|
}
|
|
|
|
}
|