How to Run Laravel Project on Different Port?
Here, I will show you how to run the laravel project on different port. you'll learn run laravel project on different port . Here you will learn laravel run project on different port. This post will give you a simple example of php artisan serve --port. Alright, let’s dive into the steps.
We can run the laravel project using "php artisan serve" command. It will use by default 8000 port to run the laravel app. But you want to run laravel project on a different port then the artisan command provides an option called "--port" and you can run the laravel app in a different port.
So, let's see below the commands to run the laravel app with different ports. you can use a different port to laravel 6, laravel 7, laravel 8 and laravel 9 versions as well.
Run Laravel Project Command:
php artisan serve
Run Laravel Project with Different Port Command:
php artisan serve --port=8080
Run Laravel Project with Different Port and Host Command:
php artisan serve --host=localhost --port=8080
I hope it can help you...
We are Recommending you
- Laravel 9 Multiple Database Connections Example
- Laravel 9 Multi Auth: Create Multiple Authentication in Laravel
- How to Change From Name in Laravel Mail?
- Laravel Group By with Max Value Query Example
- Laravel Connect Remote Database using SSH Tunnel Example
- How to Clone Laravel Project from Github on Server?
- How to Install Laravel in Ubuntu Server?
- How to Get Last Week Data in Laravel?
- How to Get Current Year Data in Laravel?