Running PHP's Built-in Web Server

Problem

You want to quickly test your Laravel application.

But you don't want to set up a web server.

Solution

Use the php artisan serve command.

$ php artisan serve
Laravel development server started on http://localhost:8000

Now you can point your browser to http://localhost:8000 and see your application.

Press Ctrl-C to stop the server.

Discussion

Use the --port option to specify a different port.

If you want a port other than default, just specify it.

$ php artisan serve --port=8080
Laravel development server started on http://localhost:8080
comments powered by Disqus