在我的播种机中我有这个:
'route' => route('home') // should return http://localhost:8000
然而,它返回http://localhost
我只在我的播种机中遇到这个问题。在其他地方使用route('home')
将返回http://localhost:8000
。如何在播种机中找到正确的路线?我发现几年前发布的question相同,尽管它对Laravel 5.5不起作用。在此先感谢您的帮助!
尝试更改.env文件中的以下行:APP_URL=http://localhost
到APP_URL=http://localhost:8000
然后运行php artisan config:cache
以防万一