This commit is contained in:
toom1996
2025-07-04 09:50:30 +08:00
parent bb9639ce0c
commit b4416260fd
8 changed files with 53 additions and 5 deletions

View File

@ -46,10 +46,11 @@ class NewsService extends BaseService
* @param int $page
* @return array
*/
public function index(int $limit = 30, int $page = 1): array
public function index(int $id, int $limit = 30, int $page = 1): array
{
$query = AppNews::formatQuery(['created_at'])
->where('is_delete', 0)
->where('platform', $id)
->select(['id'])
->orderBy('id', 'desc');;
$pagination = $query->paginate($limit, page: $page);