90 lines
3.1 KiB
PHP
90 lines
3.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
use App\Enums\StaticPageType;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\BrandAdvantage;
|
|
use App\Models\KeyNumber;
|
|
use App\Models\Profession;
|
|
use App\Models\StaticPage;
|
|
use App\Models\Video;
|
|
|
|
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();
|
|
$professionModels = Profession::query()->where('published', true)->take(5)->get();
|
|
$brandAdvantageModels = BrandAdvantage::query()->where('published', true)->orderBy('order')->get();
|
|
return view('fo.pages.recruitment', compact('staticPageModel', 'professionModels', 'brandAdvantageModels'));
|
|
}
|
|
|
|
/**
|
|
* Who are we page.
|
|
*
|
|
* @param \App\Models\StaticPage $staticPageModel
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function story(StaticPage $staticPageModel)
|
|
{
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::story)->first();
|
|
$keyNumberModels = KeyNumber::query()->where('published', true)->orderBy('order')->take(5)->get();
|
|
return view('fo.pages.story', compact('staticPageModel', 'keyNumberModels'));
|
|
}
|
|
|
|
/**
|
|
* Advertising saga page.
|
|
*
|
|
* @param \App\Models\StaticPage $staticPageModel
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function saga(StaticPage $staticPageModel)
|
|
{
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::saga)->first();
|
|
$videoModels = Video::query()->where('published', true)->orderBy('order')->with('product')->take(6)->get();
|
|
return view('fo.pages.saga', compact('staticPageModel', 'videoModels'));
|
|
}
|
|
}
|