mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
[API] comments list
This commit is contained in:
@@ -25,17 +25,8 @@ class CommentController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$torrentId = $request->torrent_id;
|
||||
$with = ['create_user', 'update_user'];
|
||||
$comments = Comment::query()
|
||||
->with($with)
|
||||
->where('torrent', $torrentId)
|
||||
->paginate();
|
||||
$comments = $this->repository->getList($request, Auth::user());
|
||||
$resource = CommentResource::collection($comments);
|
||||
// $resource->additional([
|
||||
// 'page_title' => nexus_trans('comment.index.page_title'),
|
||||
// ]);
|
||||
|
||||
return $this->success($resource);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user