ldc-bien-etre-animal/app/Http/Controllers/Front/QuestionsResponsesController.php

28 lines
749 B
PHP
Raw Normal View History

2026-08-28 08:40:04 +00:00
<?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'];
2026-08-31 16:54:51 +02:00
return Inertia::render('front/Pages/QuestionsResponses', [
'themes' => collect($themes)
2026-08-28 08:40:04 +00:00
->map(fn ($label, $value) => ['label' => $label, 'value' => $value])
->values()
->all(),
'questions' => $translations['questions'],
2026-08-31 16:54:51 +02:00
]);
2026-08-28 08:40:04 +00:00
}
}