107 lines
3.6 KiB
PHP
107 lines
3.6 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\BasicTable;
|
|
use App\Models\BasicBanner;
|
|
use App\Models\HomepageSlide;
|
|
use App\Models\HomepageNewscast;
|
|
use App\Models\HomepageWhoarewe;
|
|
use App\Models\HomepageHook;
|
|
use App\Models\WhoareweBrand;
|
|
use App\Models\WhoareweBrandDetail;
|
|
use App\Models\WhoareweContact;
|
|
use App\Models\WhoareweDescription;
|
|
use App\Models\WhoareweExpertise;
|
|
use App\Models\WhoareweExpertiseDetail;
|
|
use App\Models\WhoareweIcon;
|
|
use App\Models\WhoareweIconDetail;
|
|
use App\Models\WhoareweKnow;
|
|
use App\Models\Faq;
|
|
|
|
class FrontController extends Controller
|
|
{
|
|
/**
|
|
* Show the homepage view.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function index(): \Illuminate\Contracts\View\View
|
|
{
|
|
$homepageslides = HomepageSlide::orderBy('order', 'ASC')->get();
|
|
$homepagenewscasts = HomepageNewscast::orderBy('order', 'ASC')->get();
|
|
$homepagewhoarewe = HomepageWhoarewe::where('slug', 'homepage_whoarewe')->first();
|
|
$homepagehook = HomepageHook::where('slug', 'homepage_hook')->first();
|
|
|
|
return view('front.home', compact('homepageslides', 'homepagewhoarewe', 'homepagehook', 'homepagenewscasts'));
|
|
}
|
|
|
|
/**
|
|
* Show the landing page view.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function mention(): \Illuminate\Contracts\View\View
|
|
{
|
|
$mention = BasicTable::where('slug', 'mention_legale')->first();
|
|
|
|
return view('front.mention', compact('mention'));
|
|
}
|
|
|
|
/**
|
|
* Show the privacy policy view.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function charte(): \Illuminate\Contracts\View\View
|
|
{
|
|
$charte = BasicTable::where('slug', 'charte_confidentialite')->first();
|
|
|
|
return view('front.charte', compact('charte'));
|
|
}
|
|
|
|
/**
|
|
* Show the 'whoarewe' view.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function whoarewe(): \Illuminate\Contracts\View\View
|
|
{
|
|
$whoarewebanner = BasicBanner::where('slug', 'main_whoarewebanner')->first();
|
|
$whoarewedescription = WhoareweDescription::where('slug', 'whoarewe_description')->first();
|
|
$whoareweicon = WhoareweIcon::orderBy('order', 'ASC')->get();
|
|
$whoareweicondetail = WhoareweIconDetail::where('slug', 'whoarewe_icon_detail')->first();
|
|
$whoarewecontact = WhoareweContact::where('slug', 'whoarewe_contact')->first();
|
|
$whoareweknow = WhoareweKnow::where('slug', 'whoarewe_know')->first();
|
|
$whoareweexpertise = WhoareweExpertise::orderBy('order', 'ASC')->get();
|
|
$whoareweexpertisedetail = WhoareweExpertiseDetail::where('slug', 'whoarewe_expertise_detail')->first();
|
|
$whoarewebrand = WhoareweBrand::orderBy('order', 'ASC')->get();
|
|
$whoarewebranddetail = WhoareweBrandDetail::where('slug', 'whoarewe_brand_detail')->first();
|
|
|
|
return view('front.about', compact(
|
|
'whoarewebanner',
|
|
'whoarewedescription',
|
|
'whoareweicon',
|
|
'whoareweicondetail',
|
|
'whoarewecontact',
|
|
'whoareweknow',
|
|
'whoareweexpertise',
|
|
'whoareweexpertisedetail',
|
|
'whoarewebrand',
|
|
'whoarewebranddetail'
|
|
));
|
|
}
|
|
|
|
/**
|
|
* Show the faq view.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function faq(): \Illuminate\Contracts\View\View
|
|
{
|
|
$faq = Faq::orderBy('order', 'ASC')->get();
|
|
$faqbanner = BasicBanner::where('slug', 'faq_banner')->first();
|
|
|
|
return view('front.faq', compact('faq', 'faqbanner'));
|
|
}
|
|
}
|