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