app['url']->isValidUrl($rootUrl)) { $this->app['url']->forceRootUrl($rootUrl); } } if (option('force_ssl') || Utils::isRequestSecure()) { $this->app['url']->forceSchema('https'); } Event::listen(Events\RenderingHeader::class, function($event) { // provide some application information for javascript $blessing = array_merge(array_except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [ 'base_url' => url('/'), 'site_name' => option('site_name') ]); $event->addContent(''); }); } /** * Register any application services. * * @return void */ public function register() { // register default cipher $className = "App\Services\Cipher\\".config('secure.cipher'); if (class_exists($className)) { $this->app->singleton('cipher', $className); } else { exit(sprintf("No such encrypt method: [%s], please check your .env configuration.", config('secure.cipher'))); } $this->app->singleton('users', \App\Services\Repositories\UserRepository::class); $this->app->singleton('parsedown', \Parsedown::class); } }