Reputation: 709
New to both PHP and Laravel. Getting my "Hello, World!
" page up and kept getting a 404 "The requested resource / was not found on this server." error with Laravels included routing/view. I was using php -S localhost:8000
for my local server and didn't realize I had to use Laravel's localhost (didn't even realize it had one) "php artisan serve" to host my page. My questions are:
Laravel's localhost
vs PHP's
?I'm pretty new to programming in general, let alone php/Laravel, so my apologies if this is a very basic question or one that doesn't even make sense. Thanks for your help.
Upvotes: 7
Views: 4495
Reputation: 73251
You can use
php -S localhost:8000 -t public
which also is the only difference between artisan serve
and the standard php dev server. artisan serve simply adds the correct path to the server, there's no further magic involved.
Upvotes: 12