ldc-doux/app/Http/Controllers/MarqueController.php
Sebastien Hattry b60513fb72 Fix bugs sh01
2022-07-18 10:36:38 +00:00

35 lines
1.4 KiB
PHP

<?php
namespace App\Http\Controllers;
use App\Enums\Page;
use App\Models\Encart;
use App\Models\Moment;
use App\Models\Picto;
use App\Models\PictoBrand;
use App\Models\SeoDatum;
use App\Models\Title;
class MarqueController extends Controller
{
public function index()
{
$page = Page::marque();
$seoDatum = SeoDatum::where('page',$page)->first();
$encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first();
$encart_marqueBloc4l = Encart::where('page', Page::marqueBloc4l()->value)->first();
$encart_marqueBloc4r = Encart::where('page', Page::marqueBloc4r()->value)->first();
$encart_marqueFooter = Encart::where('page', Page::marqueFooter()->value)->first();
$pictobrands_marque = PictoBrand::all();
$pictos_marqueBloc2 = Picto::where('page', Page::marqueBloc2()->value)->get();
$title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first();
$title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first();
$moments = Moment::where('page', Page::marqueHistory()->value)->get();
return view('front.a-propos', compact('seoDatum', 'encart_marqueHeader', 'encart_marqueBloc4l',
'encart_marqueBloc4r', 'encart_marqueFooter', 'pictobrands_marque', 'title_marqueBloc2',
'pictos_marqueBloc2', 'moments', 'title_marqueBloc4'));
}
}