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
|
|
|
|
|
{
|
2022-08-29 17:23:10 +02:00
|
|
|
/**
|
|
|
|
|
* Show the FoodService view.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Contracts\View\View
|
|
|
|
|
*/
|
2022-05-12 16:03:40 +02:00
|
|
|
public function index()
|
|
|
|
|
{
|
2022-08-11 12:34:27 +02:00
|
|
|
$page = Page::foodservice();
|
2022-07-27 14:33:56 +02:00
|
|
|
$seoDatum = SeoDatum::where('page', $page)->first();
|
2022-05-12 16:03:40 +02:00
|
|
|
|
2022-08-11 12:34:27 +02:00
|
|
|
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
2022-05-13 13:19:40 +02:00
|
|
|
$title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first();
|
2022-08-11 12:34:27 +02:00
|
|
|
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
|
|
|
|
$products_food = Product::where('is_food_service', true)->get();
|
2022-05-13 13:19:40 +02:00
|
|
|
|
2022-07-27 14:33:56 +02:00
|
|
|
return view('front.food-service', compact(
|
|
|
|
|
'seoDatum',
|
|
|
|
|
'encart_food',
|
|
|
|
|
'title_foodBloc2',
|
|
|
|
|
'pictos_food',
|
|
|
|
|
'products_food'
|
|
|
|
|
));
|
2022-05-12 16:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|