update
This commit is contained in:
@ -52,10 +52,17 @@ class NewsService extends BaseService
|
|||||||
'11' => [1, 11],
|
'11' => [1, 11],
|
||||||
'10' => [9, 10],
|
'10' => [9, 10],
|
||||||
];
|
];
|
||||||
|
|
||||||
$query = AppNews::formatQuery(['created_at'])
|
$query = AppNews::formatQuery(['created_at'])
|
||||||
->where('is_delete', 0)
|
->where('is_delete', 0);
|
||||||
->where('platform', $relationId[$id] ?? $id)
|
|
||||||
->select(['id'])
|
if (isset($relationId[$id])) {
|
||||||
|
$query->whereIn('platform', $relationId[$id]);
|
||||||
|
} else {
|
||||||
|
$query->whereIn('platform', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query->select(['id'])
|
||||||
->orderBy('id', 'desc');;
|
->orderBy('id', 'desc');;
|
||||||
$pagination = $query->paginate($limit, page: $page);
|
$pagination = $query->paginate($limit, page: $page);
|
||||||
$ids = [];
|
$ids = [];
|
||||||
|
Reference in New Issue
Block a user