fix actu global

This commit is contained in:
Jérémy Munsch 2021-07-22 10:23:33 +02:00
parent 33c3aac303
commit 68c51d49d9

View file

@ -37,12 +37,15 @@ class AppServiceProvider extends ServiceProvider
if (!app()->runningInConsole()) {
try {
View::share('momentFiche', Moments::getCachedStar() ?? false);
View::share('actusGlobal', Articles::getCachedActus() ?? false);
} catch (\Exception $e) {
Log::critical($e->getMessage());
} finally {
View::share('momentFiche', false);
View::share('actusGlobal', false);
}
try {
View::share('actusGlobal', Articles::getCachedActus() ?? []);
} catch (\Exception $e) {
Log::critical($e->getMessage());
View::share('actusGlobal', []);
}
}
}