我希望能够在不同的标签/端口上同时为多个laravel应用程序提供服务,这是为了展示各种设计,遗憾的是,当我运行php artisan serve时,在端口8000上一次只能运行一个应用程序。
即使在更新到laravel 5.8之后,也要形成文档:
Artisan Serve Improvements
In previous releases of Laravel, Artisan's serve command would serve your application on port 8000. If another serve command process was already listening on this port, an attempt to serve a second application via serve would fail. Beginning in Laravel 5.8, serve will now scan for available ports up to port 8009, allowing you to serve multiple applications at once.
我是不是漏掉了什么?
发布于 2019-05-24 14:36:30
使用php artisan serve --port='YOUR-PORT‘命令。
发布于 2019-05-24 09:43:04
您可以在运行php artisan serve
时添加--port ####
,如下所示:
php artisan serve --port 8001
,这将在端口8001上运行您的项目
发布于 2019-05-24 08:41:18
你可以使用Laravel Valet来做这件事,你基本上每个站点都有本地域,如果你在windows上,我每天都在MacOS上使用它,这应该会有帮助:
https://stackoverflow.com/questions/56284454
复制相似问题