In this tutorial learn how to change default host or port in laravel with run php artisan serve command.
To change default host and/or port for the artisan serve command, you need to edit the ServeCommand.php file:
Replace with your host with 127.0.0.1 and port with your required port with 8000
To change default host and/or port for the artisan serve command, you need to edit the ServeCommand.php file:
$ sudo nano vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php
protected 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'],
];
}
Replace with your host with 127.0.0.1 and port with your required port with 8000
No comments:
Post a Comment