$commentTag ]; $fields = ['*']; $page = request('page', 1); $limit = request('limit', 20); switch (request('type')){ case 1: //训练 $sort = '`number_of_studies` desc, `id` desc'; return MentalityDrillFacade::getList($conditions, $fields, $sort, $page, $limit); break; case 2: //量表 $sort = '`number_of_test` desc, `id` desc'; return ScaleFacade::getList($conditions, $fields, $sort, $page, $limit); break; case 3: //文章(专家来了) $sort = '`number_of_studies` desc, `id` desc'; return SpecialistInfoFacade::getList($conditions, $fields, $sort, $page, $limit); break; } } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }