32 lines
845 B
PHP
32 lines
845 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Enums\StaticPageType;
|
|
use App\Models\StaticPage;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class StaticPageController extends Controller
|
|
{
|
|
/**
|
|
* Show legals conditions page
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function legals(): View
|
|
{
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::legals())->firstOrFail();
|
|
return view('front.legals', compact('staticPageModel'));
|
|
}
|
|
|
|
/**
|
|
* Show page Charte de confidentialité
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function charte(): View
|
|
{
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::confidentiality())->firstOrFail();
|
|
return view('front.charte', compact('staticPageModel'));
|
|
}
|
|
}
|