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:

  • 68 courses (1183 lessons, 43 h 18 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord