php artisan serve not working

When I type in

php artisan serve --host test.com

I got this error

[Wed Jan 14 12:54:12 2015] Failed to listen on test.com:8000 (reason: Can't assign requested address)

so I tried

php artisan serve --host test.com --port 8080

and I still got the same error just the port number is different. And it's the same with every number I can think of.

shiva
shiva
  • 2 years ago

I realize this is a bit late, but perhaps it will help someone. Try the following...

php artisan serve --host 0.0.0.0 --port 8080

You also run laravel command following step.... step - 1 : go in your public directory and write this command

php -S localhost:8000

step - 2 : go in your browser and wite

localhost:8000