🏆 Add highscore feature with API endpoints, validations, and tests

- **Added:** Endpoints for submitting highscores (`highscores.store`) and retrieving the leaderboard (`highscores.index`).
- **Implemented:** Validation rules via `StoreHighscoreRequest` to ensure highscore integrity.
- **Included:** `Highscore` model, migration, and factory for data handling and seeding.
- **Enhanced:** Comprehensive feature tests covering submission, updating, retrieval, and payload validation.
This commit is contained in:
HolgerHatGarKeineNode
2026-02-02 12:27:01 +01:00
parent 5f5a369ff9
commit 6dd04dee30
7 changed files with 422 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
use App\Http\Controllers\Api\CityController;
use App\Http\Controllers\Api\CountryController;
use App\Http\Controllers\Api\CourseController;
use App\Http\Controllers\Api\HighscoreController;
use App\Http\Controllers\Api\LecturerController;
use App\Http\Controllers\Api\MeetupController;
use App\Http\Controllers\Api\VenueController;
@@ -184,3 +185,6 @@ Route::get('/lnurl-auth-callback', [\App\Http\Controllers\LnurlAuthController::c
Route::post('/check-auth-error', [\App\Http\Controllers\LnurlAuthController::class, 'checkError'])
->name('auth.check-error');
Route::get('highscores', [HighscoreController::class, 'index'])->name('highscores.index');
Route::post('highscores', [HighscoreController::class, 'store'])->name('highscores.store');