ldc-bien-etre-animal/app/Http/Controllers/Front/QuestionsResponsesController.php
2026-08-28 10:40:04 +02:00

26 lines
751 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Controllers\Front;
use Inertia\Inertia;
use Inertia\Response;
use Uwil\LaravelCommon\Controllers\CommonController;
class QuestionsResponsesController extends CommonController
{
public function index(): Response
{
$translations = \trans('questions_responses_page');
/** @var array<string, string> $themes */
$themes = $translations['themes'];
return Inertia::render('front/Pages/QuestionsResponses', [
'themes' => collect($themes)
->map(fn ($label, $value) => ['label' => $label, 'value' => $value])
->values()
->all(),
'questions' => $translations['questions'],
]);
}
}