ldc-legaulois/app/Http/Controllers/Fo/CommitmentController.php
2026-06-05 18:30:02 +02:00

44 lines
1.5 KiB
PHP

<?php
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Models\StaticPage;
class CommitmentController extends Controller
{
/**
* Display the given commitment page.
* @return \Illuminate\Contracts\View\View
*/
public function getRestpectEarthPage(): \Illuminate\Contracts\View\View
{
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::respectTheEarth);
$staticPageModel->load(['sections.blocks', 'sections.pictos']);
return view('fo.pages.commitments.respect', ['staticPageModel' => $staticPageModel]);
}
/**
* Display the given commitment page.
* @return \Illuminate\Contracts\View\View
*/
public function getLivingToghether(): \Illuminate\Contracts\View\View
{
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::forLivingTogether);
$staticPageModel->load(['sections.blocks', 'sections.pictos']);
return view('fo.pages.commitments.life', ['staticPageModel' => $staticPageModel]);
}
/**
* Display the given commitment brand poultry page.
* @return \Illuminate\Contracts\View\View
*/
public function getBrandPoultry(): \Illuminate\Contracts\View\View
{
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::poultryBrand);
$staticPageModel->load(['sections.blocks', 'sections.pictos']);
return view('fo.pages.commitments.brand', ['staticPageModel' => $staticPageModel]);
}
}