Serve multiple laravel apps on localhost with php artisan serve

Posted 3 months ago by Gabotronix

Hi everybody, I'd like to be able to serve more than one laravel app at the same time on different tabs/ports, this is so I can showcase various designs, sadly when I run php artisan serve I can get only one app running at a time on port 8000.

Even after updating to laravel 5.8, form the docs:

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.

Is there anything I'm missing?

Please sign in or create an account to participate in this conversation.