Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

127.0.0.1:8000 keeps on loading in a laravel project

Tags:

laravel

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.

like image 823
mojahed Avatar asked May 02 '19 04:05

mojahed


People also ask

Why php artisan serve not working?

Reasons why php artisan serve not working You are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project. The requested host or port is not available.

Can Laravel run without xampp?

You can install that stack separately without XAMPP. Is it ok to develop professional Laravel applications using XAMPP? Yes, of course. XAMPP is a server environment for deploying and testing applications before even actually hosting them.

What is maintenance mode in Laravel?

Maintenance mode in Laravel prevents users from accessing the application. This is usually done when you want to carry out an update, upgrade, or debug errors from the application. You can set your application to maintenance mode by running the following command: php artisan down.


3 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.

like image 94
larp Avatar answered Oct 13 '22 12:10

larp


Try disabling your anti-virus or check your firewall. I disabled my Avast anti-virus and it's working fine for me now.

like image 4
JonattanD Avatar answered Oct 13 '22 12:10

JonattanD


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.

like image 2
Toeur Tenh Avatar answered Oct 13 '22 12:10

Toeur Tenh