Add narrator texts infrastructure with API (Story 3.1)

- Create narrator_texts table migration with context/hero_type indexes
- Add NarratorText model with getRandomText() for variant selection
- Add NarratorTextSeeder with 30+ texts for 11 contexts
- Implement vouvoiement (recruteur) vs tutoiement (client/dev)
- Create NarratorController with GET /api/narrator/{context}
- Add useFetchNarratorText composable for frontend

Contexts: intro, transitions, hints, encouragements, contact_unlocked, welcome_back

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 02:45:05 +01:00
parent e5eb9d0e78
commit c572af3072
9 changed files with 469 additions and 34 deletions

View File

@@ -1,5 +1,6 @@
<?php
use App\Http\Controllers\Api\NarratorController;
use App\Http\Controllers\Api\ProjectController;
use App\Http\Controllers\Api\SkillController;
use App\Http\Controllers\Api\TestimonialController;
@@ -14,3 +15,4 @@ Route::get('/projects/{slug}', [ProjectController::class, 'show']);
Route::get('/skills', [SkillController::class, 'index']);
Route::get('/skills/{slug}/projects', [SkillController::class, 'projects']);
Route::get('/testimonials', [TestimonialController::class, 'index']);
Route::get('/narrator/{context}', [NarratorController::class, 'getText']);