ldc-legaulois/app/Http/Controllers/Fo/StaticPageController.php
2024-03-28 10:32:03 +01:00

58 lines
1.7 KiB
PHP

<?php
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Models\StaticPage;
class StaticPageController extends Controller
{
/**
* Contact page.
*
* @param \App\Models\StaticPage $staticPageModel
* @return \Illuminate\Contracts\View\View
*/
public function contact(StaticPage $staticPageModel)
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::contact)->first();
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
}
/**
* Legals page.
*
* @param \App\Models\StaticPage $staticPageModel
* @return \Illuminate\Contracts\View\View
*/
public function legals(StaticPage $staticPageModel)
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::legals)->first();
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
}
/**
* Confidentiality page.
*
* @param \App\Models\StaticPage $staticPageModel
* @return \Illuminate\Contracts\View\View
*/
public function policies(StaticPage $staticPageModel)
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::confidentiality)->first();
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
}
/**
* Recruitment page.
*
* @param \App\Models\StaticPage $staticPageModel
* @return \Illuminate\Contracts\View\View
*/
public function recruitment(StaticPage $staticPageModel)
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::recruitment)->first();
return view('fo.pages.recruitment', ['staticPageModel' => $staticPageModel]);
}
}