Courses

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

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

leaderbord

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

php artisan make:controller ResultController

routes/web.php:

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

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:

  • 60 courses (1084 lessons, 42 h 44 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord