LoginSignup
20
15

More than 5 years have passed since last update.

Laravel5.3から5.4にあげたときにHTTPS強制でエラー

Last updated at Posted at 2017-04-04

forceSchemaforceSchemeになった話。

Laravel5.3

app/Providers/AppServiceProvider.php
    public function boot()
    {
        if (env('APP_ENV') == 'production' || env('APP_ENV') == 'staging') {
            \URL::forceSchema('https');
        }
    }

Laravel5.4

このままバージョンアップするとartisanコマンドを打ったときに、

  [BadMethodCallException]
  Method forceSchema does not exist.

って出る。

app/Providers/AppServiceProvider.php
    public function boot()
    {
        if (env('APP_ENV') == 'production' || env('APP_ENV') == 'staging') {
            \URL::forceScheme('https');
        }
    }
20
15
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
15