/** * Store a newly created resource in storage. * * @param Request $request * @return Response * @internal param $id */ public function store(Request $request) { $quiz = new Quiz(); $quiz->fill($request->all()); $quiz->status = 'started'; $quiz->user_id = Auth::user()->id; $quiz->expired_at = Carbon::now('America/Caracas')->addMinutes(2); $quiz->save(); $message = trans('messages.the_test_has_started'); Flash::success($message); return redirect()->route('quizzes.show', $quiz); }