2024-01-10 14:49:46 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
|
|
2026-09-25 16:25:31 +02:00
|
|
|
use App\Enums\StaticPageType;
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
|
use App\Models\BrandAdvantage;
|
|
|
|
|
use App\Models\HistoricalMilestone;
|
2025-03-18 10:09:56 +01:00
|
|
|
use App\Models\KeyNumber;
|
2026-09-25 16:25:31 +02:00
|
|
|
use App\Models\NewsCorporate;
|
|
|
|
|
use App\Models\Offer;
|
2024-03-27 18:32:30 +01:00
|
|
|
use App\Models\Profession;
|
2024-01-10 14:49:46 +01:00
|
|
|
use App\Models\StaticPage;
|
2024-08-09 13:44:11 +02:00
|
|
|
use App\Models\Testimonial;
|
2026-09-25 16:25:31 +02:00
|
|
|
use App\Models\Video;
|
2024-08-01 12:24:15 +02:00
|
|
|
use Detection\MobileDetect;
|
2026-09-25 16:25:31 +02:00
|
|
|
use Illuminate\Contracts\View\View;
|
2025-03-18 10:09:56 +01:00
|
|
|
use Uwil\SitemapGenerator\Lib\SitemapHelper;
|
2024-01-10 14:49:46 +01:00
|
|
|
|
|
|
|
|
class StaticPageController extends Controller
|
|
|
|
|
{
|
|
|
|
|
/**
|
2024-03-27 17:16:14 +01:00
|
|
|
* Legals page.
|
2024-01-10 14:49:46 +01:00
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function legals(): View
|
2024-01-10 14:49:46 +01:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::legals);
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-03-27 17:16:14 +01:00
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
2024-01-10 14:49:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2024-03-27 17:16:14 +01:00
|
|
|
* Confidentiality page.
|
2024-01-10 14:49:46 +01:00
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function policies(): View
|
2024-01-10 14:49:46 +01:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::confidentiality);
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-08-07 14:09:33 +02:00
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 10:09:56 +01:00
|
|
|
/**
|
|
|
|
|
* Sitemap page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function sitemap(): View
|
2025-03-18 10:09:56 +01:00
|
|
|
{
|
2025-04-03 17:12:26 +02:00
|
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::sitemap)->first();
|
|
|
|
|
$singlePages = SitemapHelper::getSinglePages();
|
2025-03-18 10:09:56 +01:00
|
|
|
|
2025-04-03 17:12:26 +02:00
|
|
|
return view('fo.pages.sitemap', ['staticPageModel' => $staticPageModel, 'singlePages' => $singlePages]);
|
2025-03-18 10:09:56 +01:00
|
|
|
}
|
|
|
|
|
|
2025-04-03 09:29:58 +02:00
|
|
|
/**
|
|
|
|
|
* Rules page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function rules(): View
|
2025-04-03 09:29:58 +02:00
|
|
|
{
|
|
|
|
|
$rules = StaticPage::query()->where('type', StaticPageType::rules)->first();
|
|
|
|
|
|
|
|
|
|
return view('fo.pages.rules', ['staticPageModel' => $rules]);
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-07 14:09:33 +02:00
|
|
|
/**
|
|
|
|
|
* Termes and conditions selling page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function selling(): View
|
2024-08-07 14:09:33 +02:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::selling);
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-08-07 14:09:33 +02:00
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Accessibility page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function accessibility(): View
|
2024-08-07 14:09:33 +02:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::accessibility);
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-03-27 17:16:14 +01:00
|
|
|
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Recruitment page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function recruitment(): View
|
2024-03-27 17:16:14 +01:00
|
|
|
{
|
2024-09-27 10:26:15 +02:00
|
|
|
$detect = new MobileDetect();
|
|
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::recruitment);
|
2025-06-03 15:47:52 +02:00
|
|
|
$offerModels = Offer::getOffersCached()->sortByDesc('published_at')->take(6);
|
2024-10-03 11:12:44 +02:00
|
|
|
$professionModels = Profession::getRandomPublished();
|
2024-09-27 10:26:15 +02:00
|
|
|
$brandAdvantageModels = BrandAdvantage::getPublishedOrdered();
|
|
|
|
|
$newsCorporateModels = NewsCorporate::get9PublishedOrderedByUpdatedAt();
|
2024-09-26 12:18:18 +02:00
|
|
|
if ($detect->isMobile()) {
|
|
|
|
|
$newsCorporateModels = $newsCorporateModels->take(3);
|
|
|
|
|
}
|
2025-06-03 15:47:52 +02:00
|
|
|
$digitalRecruiterCount = Offer::getOffersCountCached();
|
2024-09-26 12:18:18 +02:00
|
|
|
$testimonialModels = Testimonial::getPublishedOrdered();
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-07-15 14:56:46 +02:00
|
|
|
return view('fo.pages.recruitment', compact(
|
|
|
|
|
'staticPageModel',
|
|
|
|
|
'offerModels',
|
|
|
|
|
'professionModels',
|
2024-07-17 09:44:08 +02:00
|
|
|
'brandAdvantageModels',
|
|
|
|
|
'digitalRecruiterCount',
|
2024-08-09 13:44:11 +02:00
|
|
|
'testimonialModels',
|
2024-08-01 12:24:15 +02:00
|
|
|
'newsCorporateModels',
|
|
|
|
|
'detect'
|
2024-07-15 14:56:46 +02:00
|
|
|
));
|
2024-01-10 14:49:46 +01:00
|
|
|
}
|
2024-04-02 10:58:38 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Who are we page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function story(): View
|
2024-04-02 10:58:38 +02:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::story);
|
|
|
|
|
$keyNumberModels = KeyNumber::get5PublishedOrdered();
|
2024-09-27 11:02:56 +02:00
|
|
|
$historicalMilestoneModels = HistoricalMilestone::getPublishedOrdered();
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-07-18 11:19:17 +02:00
|
|
|
return view('fo.pages.story', compact('staticPageModel', 'keyNumberModels', 'historicalMilestoneModels'));
|
2024-04-02 10:58:38 +02:00
|
|
|
}
|
2024-05-14 15:16:35 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Advertising saga page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function saga(): View
|
2024-05-14 15:16:35 +02:00
|
|
|
{
|
2024-09-26 12:18:18 +02:00
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::saga);
|
|
|
|
|
$videoModels = Video::get6PublishedVideosOrderedWithProducts();
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2024-05-14 15:16:35 +02:00
|
|
|
return view('fo.pages.saga', compact('staticPageModel', 'videoModels'));
|
|
|
|
|
}
|
2026-04-30 17:54:08 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* TDF page.
|
|
|
|
|
*/
|
2026-09-25 16:25:31 +02:00
|
|
|
public function tdf(): View
|
2026-04-30 17:54:08 +02:00
|
|
|
{
|
|
|
|
|
$staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::tdf);
|
2026-09-25 16:25:31 +02:00
|
|
|
|
2026-04-30 17:54:08 +02:00
|
|
|
return view('fo.pages.tdf', compact('staticPageModel'));
|
|
|
|
|
}
|
2024-01-10 14:49:46 +01:00
|
|
|
}
|