', now()], ['status', 1] ])->get(); $articles = Articles::where('status', 1)->orderBy('updated_at', 'DESC')->get(); $categories = ArticlesCategories::whereHas('articles', function($q) { $q->where('status', 1); })->get(); $montantReductions = 0.0; foreach ($reductions as $reduc) $montantReductions += $reduc->face_value; $nbCustomers = Customers::count(); $notifications = 0; if (Auth::guard('customer')->check()) { // TODO : Récupérer le nombre de notifications du customer } return view('front.club.index', compact('montantReductions', 'nbCustomers', 'articles', 'categories', 'notifications')); } }