/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id, QuizRequest $request) { $quiz = Quiz::findOrFail($id); $quiz->category_id = $request->input('cat_list'); $quiz->update($request->all()); flash()->success('New Quiz has been updated!'); return redirect('quizzes'); }
public function update(QuizRequest $request, Quiz $quiz) { $request['date_time'] = new DateTime($request['date_time']); $quiz->update($request->all()); }