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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners