Hello buddy, I hope you are doing well in this article we will learn about how we can run laravel projects on different ports.
Sometimes it is required to run multiple laravel project at the same time, for example in the case of a project which uses API as a backend. We mostly use PHP artisan serve to run the project in the development mode but by default, it captures 8000 port.
So in this post, you will learn how to overcome this issue and we will run the multiple laravel project at the same time in the development mode by using a different port.
Basic Laravel project command
php artisan serve
When you run the above command your project can be accessible with the below URL
Run Laravel Project on different port command
php artisan serve --port=8080
when you run the above different port commands, the project will be accessible on the below URL
Run Laravel Project with Different Port and Host Command:
php artisan serve --host=localhost --port=8080
When you use the above command the host is also in your control, which means you can decide which host will use the port. Your project will accessible with the below URL
Note: All the above commands will be run from the project root folder.
I hope your issue with running laravel project on different will ends here, if you have the question feel free to comment, we will try to reply you back as soon as possible.
Don’t forget to rate our blog, helps other to understand blog quality.