runningInConsole()) { if (!Cache::has('momentFiche')) { $momentFiche = Moments::where([['star_moment', 1], ['status', 1]])->first(); Cache::put('momentFiche', $momentFiche); } View::share('momentFiche', Cache::get('momentFiche') ?? false); // Liste des actus pour le footer $actus = Cache::get('actusGlobal'); if (!Cache::has('actusGlobal')) { $actus = Articles::where([['status', 1], ['category_id', 1]]) ->orderBy('updated_at', 'DESC')->limit(3)->get(); Cache::put('actusGlobal', $actus); } View::share('actusGlobal', Cache::get('actusGlobal') ?? false); } } }