getScheme() == 'https') { $httpsConfig = [ 'https' => true ]; config([ 'admin' => array_merge(config('admin'), $httpsConfig) ]); (new AppServiceProvider(app()))->register(); } return $next($request); } }