Php Artisan Serve Not Working – Laravel Command , We will share with you how to run your laravel based project using the another php command.
If you are using the latest version for Laravel 5.X, you will see that sometime “php artisan serve” command doesn’t 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 this below command :
cd your project name
Next run the following command for run your project on localhost with the port 8000, we will not use php artisan serve. we use below the following command :
php -S localhost:8000 -t public/
After run this command on 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.
Sometime php artisan serve not working properly that time we can you also http://localhost/here_project_name/public/.
You may like
- Laravel Clear Cache Using Artisan Command CLI
- Make Auth (Artisan Command) in Laravel 6
- Laravel 6 Artisan Console Command Cheat Sheet ( List )
- Check Laravel Version Command-Line (cmd) and File
- How to Create a Controller And Model Laravel 6 Using cmd
- Laravel create and use middleware command
- Laravel clear cache shared hosting using artisan command
If you have any questions or thoughts to share, use the comment form below to reach us.