@if (Str::startsWith(config('app.url'), 'https://') && Str::startsWith(URL::current(), 'http://')) You must access the installation URL with https. @elseif (Str::startsWith(config('app.url'), 'http://') && Str::startsWith(URL::current(), 'https://')) Incorrect application URL, update the .env file APP_URL config value to start with https:// and delete all the .php files in bootstrap/cache @endif