From 2886f4484930b2324c655ea682d2e1496351801c Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Tue, 10 May 2022 12:28:00 +0200 Subject: [PATCH] remove food service from gammes count --- app/Http/Controllers/GammesController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/GammesController.php b/app/Http/Controllers/GammesController.php index f957bb1..44970d0 100644 --- a/app/Http/Controllers/GammesController.php +++ b/app/Http/Controllers/GammesController.php @@ -10,6 +10,9 @@ class GammesController extends Controller public function index() { $gammes = Gamme::whereNull('parent_gamme_id')->orderBy('title')->get(); + //remove Food Service from count + /** @var \Illuminate\Database\Eloquent\Collection $gammes */ + $gammes = $gammes->whereNotIn('slug','food-service'); $nb_gammes = $gammes->count(); return view('front.gammes.index', compact('gammes', 'nb_gammes'));