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...
As the founder and passionate educator behind this platform, I’m dedicated to sharing practical knowledge in programming to help you grow. Whether you’re a beginner exploring Machine Learning, PHP, Laravel, Python, Java, or Android Development, you’ll find tutorials here that are simple, accessible, and easy to understand. My mission is to make learning enjoyable and effective for everyone. Dive in, start learning, and don’t forget to follow along for more tips and insights!. Follow him