Php Artisan Serve Not Working – Laravel Command; In this tutorial, We will share with you how to run laravel based project using another PHP command.
If you are using the latest version of Laravel, you will see that sometimes “PHP artisan serve” command does not work properly. If you face this type of problem, you can use the below command and start your server locally.
We will run our project on localhost, so go to your project root directory using the below command :
cd project name
Next, run the following command to run your project on localhost with port 8000, we will not use PHP artisan serve. we use the following command :
php -S localhost:8000 -t public/
After running this command on the command prompt, you look like this. Start your server locally with host localhost and port 8000 :
If you want to run your project on diffrent port or diffrent host, you can do it with the of this command
php -S localhost:9000 -t public/
php -S 127.0.0.1:9000 -t public/
Now this time we check our project is running properly or not, Go to in your browser type this below :
when we hit the url in browser , look like this :
with diffrent port , look like this :
Php artisan serve not working properly we use the php -S localhost:8000 and run our project simply.
Sometimes PHP artisan serve not working properly that time we can also http://localhost/here_project_name/public/.
Recommended Laravel Tutorials
If you have any questions or thoughts to share, use the comment form below to reach us.