/** * 撤销选课申请 * @author FuRongxin * @date 2016-02-23 * @version 2.0 * @param string $kcxh 12位课程序号 * @return \Illuminate\Http\Response 选课申请列表 */ public function destroy($kcxh) { $app = Application::whereXh(Auth::user()->xh)->whereNd(session('year'))->whereXq(session('term'))->whereKcxh($kcxh)->firstOrFail(); $app->delete(); return back()->withStatus('撤销课程申请成功'); }