app->singleton( SiteRepository::class, fn() => new EloquentSiteRepository() ); } /** * Bootstrap any application services. * * @return void */ public function boot() { // * HTTPS FIX URL::forceScheme('https'); // * HA PROXY FIX App::singleton('clientIp', function () { if (config('app.env') === 'local') { return request()->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')) )); } }