PHP Artisan Serve not Working Properly in Laravel
Oct 06, 2022 . Admin

Hello Friends,
Today, I would like to show you php artisan serve not working properly in laravel. Here you will learn php artisan serve does not work code example of laravel. if you want to see example of laravel php artisan serve not working then you are a right place. We will look at example of php artisan serve not working ubuntu laravel. Let's get started with laravel command php artisan serve not working.
Generally, php artisan serve command works perfectly. Even port is busy then it starts with another port. but even if it's not working with you then I will help you manually run laravel application using php.
You can use this example with laravel 6, laravel 7, laravel 8, and laravel 9 versions.
You have just to follow the below step and you will get the layout as below:
Example 1: Run Laravel App using php CommandHere, we will go to project and then we will simply run bellow command to run laravel app.
cd your_project_folder
php -S localhost:8000 -t public/
Now, you are able to access project with following URL:
http://localhost:8000Example 2: Run Laravel App with Different Port
Here, we will go to project and then we will simply run bellow command to run laravel app with different port.
cd your_project_folder
php -S localhost:9000 -t public/
Now, you are able to access project with following URL:
http://localhost:9000Example 3: Run Laravel App with Different Host
Here, we will go to project and then we will simply run bellow command to run laravel app with different host.
cd your_project_folder
php -S 127.0.0.1:9000 -t public/
Now, you are able to access project with following URL:
http://127.0.0.1:9000
I hope it can help you...