Reputation: 307
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
Upvotes: 3
Views: 11902
Reputation: 3
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.
Upvotes: 0
Reputation: 1108
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.
Upvotes: 4
Reputation: 201
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
Upvotes: 0