Skip to main content

Now that user can take quizzes we need to save results in the DB which we will do in this tutorial.

For this we will need two Eloquent Models:

  • Test where we will save information about user, which test (another word for "quiz" but it's broader) he took, how much time it took him.
  • TestAnswer where we will store the information about which answers user chose during the quiz.

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 09 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

MA
Muhsin Ahadi ✓ Link copied!

I got an error when click Next Question

Uncaught ReferenceError: $wire is not defined at [Alpine] secondsLeft = 30; $wire.changeQuestion();

I reread the sections before and nothing different. How to fix this?

N
Nerijus ✓ Link copied!

Recheck differences your code and in the

MA
Muhsin Ahadi ✓ Link copied!

I did. Nothing different in the file

N
Nerijus ✓ Link copied!

Check the github repository. Maybe you will find something. Especially the same part where you get the error. Also, what are you using? Breeze? If so, have you removed alpine after adding livewire?

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.