| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace App\Http\Controllers\api;
- use App\Models\Cao;
- use App\Services\IssueService;
- class Issue extends BaseController
- {
- public function index()
- {
- $page = request()->input('page', 1);
- $limit = request()->input('limit', 10);
- $params = [
- 'page' => $page,
- 'limit' => $limit
- // 'status'=>3
- ];
- $res = IssueService::paginate($params);
- return $this->success($res);
- }
- public function cao()
- {
- $type = [1, 2, 3, 4];
- $list = [];
- $list[] = Cao::whereIn('id', $type)->get();
- $type = [5, 6, 7, 8];
- $list[] = Cao::whereIn('id', $type)->get();
- $type = [9,10];
- $list[] = Cao::whereIn('id', $type)->get();
- $list[] = [
- ['field'=>'2.8回本','val'=>0],
- ['field'=>'3.2回本','val'=>0],
- ];
- $type = [11,12,13];
- $list[] = Cao::whereIn('id', $type)->get();
- $list[] = Cao::where('id', '>=',14)
- ->where('id', '<=',41)
- ->get();
- $list[] = [
- ['field'=>'龙','val'=>0],
- ['field'=>'虎','val'=>0],
- ['field'=>'合','val'=>0],
- ['field'=>'鸡','val'=>0],
- ['field'=>'鸭','val'=>0],
- ['field'=>'狗','val'=>0],
- ];
- $list[] = [
- ['field'=>'中','val'=>0],
- ['field'=>'边','val'=>0],
- ['field'=>'大边','val'=>0],
- ['field'=>'小边','val'=>0],
- ];
- $list[] = Cao::where('id', '>=',42)
- ->where('id', '<=',49)
- ->get();
- return $this->success($list);
- }
- }
|