| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Exam\SubjectService;
- /**
- * 课程管理-控制器
- */
- class SubjectController extends Backend
- {
- public function __construct()
- {
- parent::__construct();
- $this->service = SubjectService::make();
- }
- // GET /admin/subjects
- public function index()
- {
- $pageSize = request()->get('limit', 10);
- $list = $this->service->customList(request()->all(), $pageSize);
- $message = array(
- "msg" => '操作成功',
- "code" => 0,
- "data" => isset($list['list']) ? $list['list'] : [],
- "count" => isset($list['total']) ? $list['total'] : 0,
- );
- return $message;
- }
- /**
- * 选项列表
- * @return mixed
- */
- public function options()
- {
- $result = $this->service->options();
- return message(1002, true, $result);
- }
- }
|