basePath('public')); $this->info("Laravel development server started: host()}:{$this->port()}>"); passthru($this->serverCommand(), $status); return $status; } /** * Get the full server command. * * @return string */ protected function serverCommand() { return sprintf( '%s -S %s:%s %s', ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)), $this->host(), $this->port(), ProcessUtils::escapeArgument(__DIR__.'/../../server.php') ); } /** * Get the host for the command. * * @return string */ protected function host() { return $this->option('host'); } /** * Get the port for the command. * * @return string */ protected function port() { return $this->option('port'); } /** * Get the console command options. * * @return array */ public function getOptions() { return [ ['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on.', '127.0.0.1'], ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on.', 8000], ]; } }