getClientIp(); } else { return request()->server('HTTP_X_FORWARDED_FOR') ?? request()->getClientIp(); } }); // LOCAL FORCE eg: for Carbon setlocale(LC_ALL, \sprintf( '%s_%s.UTF-8', config('app.locale'), \strtoupper(config('app.locale')) )); Carbon::setLocale(config('app.locale')); if (!app()->runningInConsole()) { try { View::share('momentFiche', Moments::getCachedStar() ?? false); } catch (\Exception $e) { Log::critical($e->getMessage()); View::share('momentFiche', false); } try { View::share('actusGlobal', Articles::getCachedActus() ?? []); } catch (\Exception $e) { Log::critical($e->getMessage()); View::share('actusGlobal', []); } } } }