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\Picto;
|
|
|
|
|
use App\Models\Product;
|
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 FoodServiceController extends Controller
|
|
|
|
|
{
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
|
|
|
|
$page = Page::foodservice();
|
|
|
|
|
$seoDatum = SeoDatum::where('page',$page)->first();
|
|
|
|
|
|
2022-05-13 13:19:40 +02:00
|
|
|
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
|
|
|
|
$title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first();
|
|
|
|
|
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
|
|
|
|
$products_food = Product::where('is_food_service', true)->get();
|
|
|
|
|
|
|
|
|
|
return view('front.food-service', compact('seoDatum' , 'encart_food', 'title_foodBloc2',
|
|
|
|
|
'pictos_food', 'products_food'));
|
2022-05-12 16:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|