Level 17
I think you need to create another table that store who join the quiz.
joined_quiz_table
- id
- user_id
- quiz_id
- join_datetime
Then you can do the countdown from the data in the table. Hope this gives you ideas. 👍🏻
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello im trying to make a quiz app where users can take a quiz but have to finish it within a time frame. I have done the quiz creation part and user can join to complete the quiz but now im stuck on how to add time functionality. Can someone help me in this part?
public function store(StoreTopicRequest $request)
{
//
$topic= Topic::create([
'title' => $request->title,
'no_question' => $request->question,
'duration' => $request->duration
]);
return redirect(route('topics.index'));
}
This is where i store the quiz, but how can i use the duration so or to begin countdown??
I think you need to create another table that store who join the quiz.
joined_quiz_table
Then you can do the countdown from the data in the table. Hope this gives you ideas. 👍🏻
Please or to participate in this conversation.