Hi my friends, maybe you have implemented modules in Laravel project ready and the problem happen when you run command php artisan serve
which to start laravel server but the command not working properly or your server is not going to start properly. Today we will share a tip to run your laravel project using alternative php command to start your laravel project.
First, make sure you are on Laravel root directory project then open terminal or command prompt and type following command to get into root directory.
cd your_project_name
Then run the command below to start server on localhost with port 8000, this time we are not going to use php artisan serve
.
php -S localhost:8000 -t public/
The command above will activate and run server locally with localhost and port 8000. Sometimes your port is using by another application in that case you should try to change to different port as command below
php -S localhost:1000 -t public/
Well, we also can change IP host in case you access in LAN
php -S 127.0.0.1:1000 -t public/
Now you can try the url in browser http://localhost:8000 base on what you have run the command.
Hope this short article help you solve the problem. Thanks
You might also like...
Founder of CamboTutorial.com, I am happy to share my knowledge related to programming that can help other people. I love write tutorial related to PHP, Laravel, Python, Java, Android Developement, all published post are make simple and easy to understand for beginner. Follow him