/** * 显示学生选课申请表单 * @author FuRongxin * @date 2016-02-23 * @version 2.0 * @param \Illuminate\Http\Request $request 申请请求 * @return \Illuminate\Http\Response 选课申请表单 */ public function create(Request $request) { $inputs = $request->all(); if ('retake' == $inputs['type']) { $courses = Selcourse::studied(Auth::user())->orderBy('kcxh')->get(); } $view = view('application.create')->withTitle('其他课程选课申请表')->withType($inputs['type'])->withKcxh($inputs['kcxh']); if ('retake' == $inputs['type']) { $view = $view->withTitle('重修课程选课申请表')->withCourses($courses); } return $view; }