Statix Server is a fantastic package introduced by https://github.com/statix-php that offers an object oriented wrapper around PHP's built-in server. You can install this package via composer by running this command in your terminal composer require statix/server

You can configure several options with the server, such as the host, the port, the root directory, and more.

'/content' ]); // or new Server([ 'host' => 'localhost', 'port' => 8000, 'root' => __DIR__.

$optionsSettableViaContructor = [ 'host' => 'string', // default: localhost 'port' => 'string|int', // default: 8000 'root' => 'string', // default: getcwd() 'router' => 'string', // path to your routing script 'executable' => 'string', // path to the desired PHP binary to use for the server 'withEnvVars' => [ ], 'withoutEnvVars' => [ ]]; Setting configuration via the named methods
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners