33 lines
783 B
PHP
33 lines
783 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Services\Config as ConfigService;
|
|
use Inertia\Inertia;
|
|
use Inertia\Response;
|
|
|
|
final class LandingController extends Controller
|
|
{
|
|
/**
|
|
* Display the landing page with a flag indicating whether a disclaimer is configured.
|
|
*/
|
|
public function index(ConfigService $config): Response
|
|
{
|
|
return Inertia::render('Landing', [
|
|
'hasDisclaimer' => $config->contentDisclaimer !== '',
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Display the disclaimer page with the configured markdown content.
|
|
*/
|
|
public function disclaimer(ConfigService $config): Response
|
|
{
|
|
return Inertia::render('Disclaimer', [
|
|
'content' => $config->contentDisclaimer,
|
|
]);
|
|
}
|
|
}
|