2019独角兽企业重金招聘Python工程师标准>>>
- 第一步:文件.env中配置APP_URL 为https://domain(自己的域名)
- 第二步:打开app->Providers->AppServiceProvider.php
- 第三步:use Illuminate\Routing\UrlGenerator;
- 第四部:更改boot方法
public function boot(UrlGenerator $url){//if(env('REDIRECT_HTTPS')){$url->forceSchema('https');}}
- 第五步:设置REDIRECT_HTTPS在配置文件.env中为true
-(来源季书歌)