LoginSignup
15

More than 5 years have passed since last update.

posted at

updated at

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

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');
        }
    }

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
What you can do with signing up
15