I have a laravel project but when I use the command "php artisan serve" and type the url: http://127.0.0.1:8000/ , its just keep on loading without output nor error appear.
11 Answers
I solved this by running this command instead of PHP artisan serve.
php -S 127.0.0.1:8000 -t public/
Then try to load again 127.0.0.1:8000 in your browser.
1 Comment
The port 8000 might be used by other in your computer. Try to change port by running in your project in cmd:
php artisan serve --port=1000
then type http://127.0.0.1:1000/ on your browser.
Comments
Run commands
php artisan config:clear
php artisan config:cache
Even after completing these steps, if Laravel is still showing error, check your_project/storage/logs/laravel.log.
3 Comments
Try these three commands for clearing cache config:
php artisan config:cache // clear config cache
php artisan config:clear // clear config cache
php artisan cache:clear // clear cache
php artisan optimize // To reoptimize the class loader
php artisan route:cache // clear route cache
php artisan view:clear // clear view cache
4 Comments
It sometimes happen because of too many redirection and also sometime because of middleware . so see your whole flow for that page.
Also see your cdn which included in your page because it take too many time if you have too many cdn and your connection is slow. And also try to clear all cache.
Comments
I experienced this problem also when I first launched out into Laravel. Your port 8000 is most likely occupied by another service or program. Simply go to your terminal where your project is open, and enter the following command
php artisan serve --port=1000
Then, return to your browser and enter the address, replacing 8000 with 1000, as in
127.0.0.1:1000
This worked for me.
Comments
In my case, MySQL was running fine. unless it wasn't. It was showing that it was running okay, but it wasn't. Cause when restarting the Xampp MySQL server. It stated that MySQL couldn't start due to a blocked port or... I then renamed Xampp/mysql/data to Xampp/mysql/data_old created a new folder named data there and copied everything from Xampp/mysql/backup to Xampp/mysql/data. then restarted the Xampp MySQL server,
my laravel project also finished loading and served the application. so the problem was with mysql server not starting properly.