ldc-doux/app/Http/Controllers/MarqueController.php

45 lines
1.5 KiB
PHP
Raw Normal View History

2022-05-12 16:03:40 +02:00
<?php
namespace App\Http\Controllers;
use App\Enums\Page;
2022-05-13 13:19:40 +02:00
use App\Models\Encart;
use App\Models\Moment;
use App\Models\Picto;
use App\Models\PictoBrand;
2022-05-12 16:03:40 +02:00
use App\Models\SeoDatum;
2022-05-13 13:19:40 +02:00
use App\Models\Title;
2022-05-12 16:03:40 +02:00
class MarqueController extends Controller
{
public function index()
{
2022-08-11 12:34:27 +02:00
$page = Page::marque();
2022-07-27 14:33:56 +02:00
$seoDatum = SeoDatum::where('page', $page)->first();
2022-05-12 16:03:40 +02:00
2022-05-13 13:19:40 +02:00
$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();
2022-08-11 12:34:27 +02:00
$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();
2022-05-13 13:19:40 +02:00
2022-07-27 14:33:56 +02:00
return view('front.a-propos', compact(
'seoDatum',
'encart_marqueHeader',
'encart_marqueBloc4l',
'encart_marqueBloc4r',
'encart_marqueFooter',
'pictobrands_marque',
'title_marqueBloc2',
'pictos_marqueBloc2',
'moments',
'title_marqueBloc4'
));
2022-05-12 16:03:40 +02:00
}
}