How to force Laravel Project to use HTTPS for all routes?

前端 未结 10 543
攒了一身酷
攒了一身酷 2020-12-13 03:33

I am working on a project that requires a secure connection.

I can set the route, uri, asset to use \'https\' via:

Route::get(\'order/details/{id}\',         


        
10条回答
  •  忘掉有多难
    2020-12-13 04:26

    public function boot()
    {
      if(config('app.debug')!=true) {
        \URL::forceScheme('https');
      }
    }
    

    in app/Providers/AppServiceProvider.php

提交回复
热议问题