我已经在Laravel 5.8中配置了.env和config / app.php中的所有内容,以便在heroku中进行生产准备,如下所示:
APP_NAME=Laraclass
APP_ENV=production
APP_KEY=xxx
APP_DEBUG=true
APP_URL=http://larafresh.herokuapp.com
然后我尝试创建一个帐户并检查我的电子邮件验证功能,并且电子邮件中的验证链接或APP_URL返回到http://localhost:8000,我试图重新启动应用程序,并清除配置,但仍然卡在这里。我不知道这里会发生什么,因为在我创建的另一个链接上(电子邮件功能之外),它返回到我设置的APP_URL。
答案 0 :(得分:0)
首先清除配置缓存。
php artisan config:clear
然后重新启动应用程序。
php artisan serve
答案 1 :(得分:0)
如果您首先在服务器中,请不要尝试此已接受的答案。 在.env文件中更改APP_URL取决于严重的问题。
php artisan config:clear
php artisan cache:clear
composer dump-autoload
php artisan view:clear
php artisan route:clear
这足以在您的本地计算机上进行更改。php artisan config:clear
php artisan cache:clear
composer dump-autoload
php artisan view:clear
php artisan route:clear
另外,您还必须重新启动队列
php artisan queue:restart
php artisan queue:work
php artisan config:clear
php artisan cache:clear
composer dump-autoload
php artisan view:clear
php artisan route:clear
另外,您还必须重新启动supervisor
sudo supervisorctl restart all