1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 08:10:07 +01:00

Merge branch 'master' into tld-alias-for-domain-command

This commit is contained in:
Chris Brown
2018-06-22 14:03:56 -04:00
committed by GitHub
17 changed files with 266 additions and 30 deletions

View File

@@ -35,6 +35,20 @@ function valet_support_wildcard_dns($domain)
return $domain;
}
/**
* @param array $config Valet configuration array
*
* @return string|null If set, default site path for uncaught urls
* */
function valet_default_site_path($config)
{
if (isset($config['default']) && is_string($config['default']) && is_dir($config['default'])) {
return $config['default'];
}
return null;
}
/**
* Load the Valet configuration.
*/
@@ -77,7 +91,7 @@ function valet_support_wildcard_dns($domain)
}
}
if (is_null($valetSitePath)) {
if (is_null($valetSitePath) && is_null($valetSitePath = valet_default_site_path($valetConfig))) {
show_valet_404();
}