ldc-bien-etre-animal/app/Http/Controllers/Front/ApproachController.php
2026-09-07 10:09:49 +02:00

67 lines
2.2 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Http\Controllers\Front;
use Inertia\Inertia;
use Inertia\Response;
use Uwil\LaravelCommon\Controllers\CommonController;
use Uwil\LaravelSchemaOrg\Services\SchemaOrgService;
class ApproachController extends CommonController
{
/**
* Show why this approach page.
*/
public function whyThisApproach(SchemaOrgService $schemaOrg): Response
{
$trans = trans('why_this_approach');
$title = str_replace('\n', ' ', $trans['title']);
$title = preg_replace('/\s+/', ' ', $title) ?? $title;
$title = strip_tags($title);
$title = trim($title);
return Inertia::render('front/Pages/Approach/WhyThisApproach', [
'schemas' => [
$schemaOrg->setWebPage()
->headline($trans['seo_title'])
->description($trans['seo_description'])
->name($title)
->isAccessibleForFree(true)
->keywords(['page'])
->dateCreated(new \DateTimeImmutable('2026-09-03'))
->dateModified(new \DateTimeImmutable('2026-09-03'))
->datePublished(new \DateTimeImmutable('2026-09-03')),
],
]);
}
/**
* Show animal welfare page.
*/
public function animalWelfare(SchemaOrgService $schemaOrg): Response
{
$trans = trans('animal_welfare');
$title = str_replace('\n', ' ', $trans['title']);
$title = preg_replace('/\s+/', ' ', $title) ?? $title;
$title = strip_tags($title);
$title = trim($title);
return Inertia::render('front/Pages/Approach/AnimalWelfare', [
'schemas' => [
$schemaOrg->setWebPage()
->headline($trans['meta']['seo_title'])
->description($trans['meta']['seo_description'])
->name($title)
->isAccessibleForFree(true)
->keywords(['page'])
->dateCreated(new \DateTimeImmutable('2026-09-03'))
->dateModified(new \DateTimeImmutable('2026-09-03'))
->datePublished(new \DateTimeImmutable('2026-09-03')),
],
]);
}
}