3
votes

I am using windows 10 and wamp server and I am fresh installing laravel and all i get is this error message and is it necessary to do php artisan serve everytime i open laravel ? as long as i close cmd prompt localhost:8000 refused to connect .

Php artisan serve error Php artisan serve error

3
current view ? i am not clear what are you talking about @alexey - designerdarpan

3 Answers

4
votes

I think you are running a Laravel project blog by command php artisan serve and you are browsing your application by localhost:8000 or 127.0.0.1:8000

Your screenshot saying that when you are trying to visit a url which is not defined in your routes/web.php then, you are getting invalid request (Unexpected EOF) error in your cmd.

And of course! in this case when you close cmd then your Laravel app will not run.

So now, if you don't want to run your Laravel app by the following command each time, then you can use Laragon in windows environment.

0
votes

Either you have to run php aritsan serve or set up a virtual host in your OS. Here is how to set up a virtual host in Ubuntu 16.04: How To Set Up Apache Virtual Hosts on Ubuntu 16.04

0
votes

This is case, you can keep your cmd open. And open another cmd, redirect to file path where you are working and it should work fine.