Skip to content

Instantly share code, notes, and snippets.

@madalinignisca
Created October 24, 2020 06:19
Show Gist options
  • Save madalinignisca/1c7a360fb75dfce4a317843eaf63a637 to your computer and use it in GitHub Desktop.
Save madalinignisca/1c7a360fb75dfce4a317843eaf63a637 to your computer and use it in GitHub Desktop.
Laravel Serve Command default to host 0.0.0.0
<?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