2024-04-19 10:56:37 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
|
|
|
|
|
|
use App\Enums\StaticPageType;
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
|
use App\Models\StaticPage;
|
2025-03-11 12:15:00 +01:00
|
|
|
use Uwil\SitemapGenerator\Lib\SitemapHelper;
|
2024-04-19 10:56:37 +02:00
|
|
|
|
|
|
|
|
class StaticPageController extends Controller
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Legal show
|
|
|
|
|
*
|
|
|
|
|
* @param \App\Models\StaticPage $legalPage
|
|
|
|
|
* @return \Illuminate\Contracts\View\View
|
|
|
|
|
*/
|
|
|
|
|
public function legals(StaticPage $legalPage)
|
|
|
|
|
{
|
|
|
|
|
$legalPage = StaticPage::query()->where('type', StaticPageType::legals)->first();
|
|
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $legalPage]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Policies show
|
|
|
|
|
*
|
|
|
|
|
* @param \App\Models\StaticPage $policiesPage
|
|
|
|
|
* @return \Illuminate\Contracts\View\View
|
|
|
|
|
*/
|
|
|
|
|
public function policies(StaticPage $policiesPage)
|
|
|
|
|
{
|
|
|
|
|
$policiesPage = StaticPage::query()->where('type', StaticPageType::confidentiality)->first();
|
|
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $policiesPage]);
|
|
|
|
|
}
|
2025-03-11 12:15:00 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sitemap show
|
|
|
|
|
*
|
|
|
|
|
* @param \App\Models\StaticPage $sitemap
|
|
|
|
|
* @return \Illuminate\Contracts\View\View
|
|
|
|
|
*/
|
|
|
|
|
public function sitemap(StaticPage $sitemap)
|
|
|
|
|
{
|
2025-04-09 09:49:15 +02:00
|
|
|
$sitemap = StaticPage::query()->where('type', StaticPageType::sitemap)->first();
|
2025-03-11 12:15:00 +01:00
|
|
|
$singlePages = SitemapHelper::getSinglePages();
|
|
|
|
|
return view('fo.pages.sitemap', ['staticPageModel' => $sitemap, 'singlePages' => $singlePages]);
|
|
|
|
|
}
|
2024-04-19 10:56:37 +02:00
|
|
|
}
|