Creating a Quiz System with Laravel + Livewire: Step-by-Step

After saving the quiz results, now we can show user how did they do in the quiz, also adding the leaderboard.


First, we need a controller and a route for that.

php artisan make:controller ResultController


Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('quiz/{quiz}/{slug?}', [HomeController::class, 'show'])->name('');
Route::get('results/{test}', [ResultController::class, 'show'])->name('');
// ...

And now after creating the test we can redirect to this page...

This lesson is only for Premium Members.
Want to access all lessons of this course?

You also get:

  • 42 courses (796 lessons, 45 h 33 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord