Created
October 24, 2020 06:19
-
-
Save madalinignisca/1c7a360fb75dfce4a317843eaf63a637 to your computer and use it in GitHub Desktop.
Laravel Serve Command default to host 0.0.0.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Foundation\Console\ServeCommand as OriginalServeCommand; | |
class ServeCommand extends OriginalServeCommand | |
{ | |
protected function getOptions() | |
{ | |
$options = parent::getOptions(); | |
$options[0][4] = env('SERVER_HOST', '0.0.0.0'); | |
return $options; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment