locale file & thank api

This commit is contained in:
xiaomlove
2022-02-21 00:14:52 +08:00
parent 3a357f1534
commit 7409e90875
14 changed files with 60 additions and 8 deletions
+8 -1
View File
@@ -16,8 +16,15 @@ class ThankController extends Controller
public function index(Request $request)
{
$torrentId = $request->torrent_id;
$thanks = Thank::query()->where('torrentid', $torrentId)->with(['user'])->paginate();
$thanks = Thank::query()
->where('torrentid', $torrentId)
->whereHas('user')
->with(['user'])
->paginate();
$resource = ThankResource::collection($thanks);
$resource->additional([
'page_title' => nexus_trans('thank.index.page_title'),
]);
return $this->success($resource);
}