1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

Add loopback command.

This commit is contained in:
Mikaël Popowicz
2021-02-21 23:21:12 +01:00
parent cc01db7eb9
commit 2d5ee9d7cc
12 changed files with 144 additions and 31 deletions

View File

@@ -36,7 +36,7 @@ function install()
/**
* Forcefully delete the Valet home configuration directory and contents.
*
*
* @return void
*/
function uninstall()
@@ -130,7 +130,7 @@ function createCertificatesDirectory()
function writeBaseConfiguration()
{
if (! $this->files->exists($this->path())) {
$this->write(['tld' => 'test', 'paths' => []]);
$this->write(['tld' => 'test', 'loopback' => VALET_LOOPBACK, 'paths' => []]);
}
/**
@@ -138,11 +138,13 @@ function writeBaseConfiguration()
*/
$config = $this->read();
if (isset($config['tld'])) {
return;
if (! isset($config['tld'])) {
$this->updateKey('tld', !empty($config['domain']) ? $config['domain'] : 'test');
}
$this->updateKey('tld', !empty($config['domain']) ? $config['domain'] : 'test');
if (! isset($config['loopback'])) {
$this->updateKey('loopback', VALET_LOOPBACK);
}
}
/**