Issue.php 728 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Http\Controllers\api;
  3. use App\Models\Cao;
  4. use App\Services\IssueService;
  5. class Issue extends BaseController
  6. {
  7. public function index()
  8. {
  9. $page = request()->input('page', 1);
  10. $limit = request()->input('limit', 10);
  11. $params = [
  12. 'page' => $page,
  13. 'limit' => $limit
  14. // 'status'=>3
  15. ];
  16. $res = IssueService::paginate($params);
  17. return $this->success($res);
  18. }
  19. public function cao()
  20. {
  21. $type = [1, 2, 3, 4];
  22. $list = [];
  23. $list[] = Cao::whereIn('id', $type)->get();
  24. $type = [5,6,7,8];
  25. $list[] = Cao::whereIn('id', $type)->get();
  26. return $this->success($list);
  27. }
  28. }