December 7, 2016 —John Koster
The serve
command is used to run the application using the PHP development server. This command is generally used for development and testing purposes. The serve
command accepts two optional options: host
can be used to change the address of the application (by default this is localhost
) and port
. The port
option can be used to change the port the application responds to (by default this is 8000
).
When using HHVM for development and testing purposes, HHVM must be at least version 3.8.0
to use the internal development server.
The following examples demonstrate how to use the serve
command:
1# Start the development server with default options. 2php artisan serve 3 4# Change the development server address. 5php artisan serve --host=homestead.app 6 7# Change the development server port. 8php artisan serve --port=8080 9 10# Change the development server address and port.11php artisan serve --host=laravel.app --port=8080
∎
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.