mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 20:06:09 +08:00
37 lines
792 B
PHP
37 lines
792 B
PHP
<?php
|
|
|
|
namespace App\Services\Logic\Comment;
|
|
|
|
use App\Library\Paginator\Query as PagerQuery;
|
|
use App\Repos\Comment as CommentRepo;
|
|
use App\Services\Logic\CommentTrait;
|
|
use App\Services\Logic\Service as LogicService;
|
|
|
|
class ReplyList extends LogicService
|
|
{
|
|
|
|
use CommentTrait;
|
|
use CommentListTrait;
|
|
|
|
public function handle($id)
|
|
{
|
|
$pagerQuery = new PagerQuery();
|
|
|
|
$params = $pagerQuery->getParams();
|
|
|
|
$params['parent_id'] = $id;
|
|
$params['published'] = 1;
|
|
|
|
$sort = $pagerQuery->getSort();
|
|
$page = $pagerQuery->getPage();
|
|
$limit = $pagerQuery->getLimit();
|
|
|
|
$commentRepo = new CommentRepo();
|
|
|
|
$pager = $commentRepo->paginate($params, $sort, $page, $limit);
|
|
|
|
return $this->handlePager($pager);
|
|
}
|
|
|
|
}
|