51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Application\Website;
|
|
|
|
|
|
use App\Framework\Attributes\Route;
|
|
use App\Framework\Http\Method;
|
|
use App\Framework\Meta\MetaData;
|
|
use App\Framework\Meta\StaticPageMetaResolver;
|
|
use App\Framework\Router\Result\ViewResult;
|
|
use App\Framework\Router\WebRoutes;
|
|
|
|
final readonly class ShowHome
|
|
{
|
|
#[Route(path: '/', method: Method::GET, name: WebRoutes::HOME)]
|
|
public function home(HomeRequest $request, string $test = 'hallo'): ViewResult
|
|
{
|
|
// Production deployment trigger - fix manifest not found
|
|
$model = new HomeViewModel('Hallo Welt!');
|
|
return new ViewResult(
|
|
template: 'test',
|
|
metaData: new StaticPageMetaResolver(
|
|
title: 'Home',
|
|
description: 'Hallo Welt!',
|
|
)(),
|
|
data: ['name' => 'Michael'],
|
|
model: $model,
|
|
);
|
|
}
|
|
|
|
#[Route(path: '/epk', name: WebRoutes::EPK)]
|
|
public function epk(string $test = 'hallo'): ViewResult
|
|
{
|
|
return new ViewResult(
|
|
'test',
|
|
new MetaData('EPK'),
|
|
);
|
|
}
|
|
|
|
#[Route(path: '/designsystem')]
|
|
public function designSystem(): ViewResult
|
|
{
|
|
return new ViewResult(
|
|
'designsystem',
|
|
new MetaData('DesignSystem')
|
|
);
|
|
}
|
|
}
|