This commit is contained in:
toom1996
2025-07-11 15:07:39 +08:00
parent cae6609d71
commit fca5d93e1b

View File

@ -52,10 +52,17 @@ class NewsService extends BaseService
'11' => [1, 11],
'10' => [9, 10],
];
$query = AppNews::formatQuery(['created_at'])
->where('is_delete', 0)
->where('platform', $relationId[$id] ?? $id)
->select(['id'])
->where('is_delete', 0);
if (isset($relationId[$id])) {
$query->whereIn('platform', $relationId[$id]);
} else {
$query->whereIn('platform', $id);
}
$query->select(['id'])
->orderBy('id', 'desc');;
$pagination = $query->paginate($limit, page: $page);
$ids = [];