remove food service from gammes count

This commit is contained in:
Olivier Legat 2022-05-10 12:28:00 +02:00
parent 3420215894
commit 2886f44849
No known key found for this signature in database
GPG key ID: E6DCE8D1E33A5803

View file

@ -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'));