コード例 #1
0
ファイル: ExamsController.php プロジェクト: rakeen/creative
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ExamRequest $request)
 {
     return Exam::create($request->all())->toJson();
 }
コード例 #2
0
 public function post_exam(Request $request)
 {
     if (Auth::user()->type == 'teacher') {
         if (Auth::user()->teacherinfo->packageinfo->exams - count(Auth::user()->exams) != 0) {
             Exam::create(['type' => $request->input('examtype'), 'tutorid' => Auth::user()->id, 'date' => $request->input('date'), 'time' => $request->input('time'), 'duration' => $request->input('duration'), 'mark' => $request->input('mark')]);
         }
     }
 }
コード例 #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(ExamRequest $request)
 {
     Exam::create($request->all());
     return "Saved!";
 }