Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ExamRequest $request)
 {
     return Exam::create($request->all())->toJson();
 }
Exemplo n.º 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')]);
         }
     }
 }
Exemplo n.º 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!";
 }