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

use local valet driver as name

This commit is contained in:
Taylor Otwell
2016-12-14 14:57:46 -06:00
parent 26d39ae3ab
commit 42834e2247

View File

@@ -43,11 +43,11 @@ abstract public function frontControllerPath($sitePath, $siteName, $uri);
public static function assign($sitePath, $siteName, $uri)
{
$drivers = [];
if ($customSiteDriver = static::customSiteDriver($sitePath)) {
$drivers[] = $customSiteDriver;
}
$drivers = array_merge($drivers, static::driversIn(VALET_HOME_PATH.'/Drivers'));
$drivers[] = 'LaravelValetDriver';
@@ -78,7 +78,7 @@ public static function assign($sitePath, $siteName, $uri)
}
}
}
/**
* Get the custom driver class from the site path, if one exists.
*
@@ -87,13 +87,13 @@ public static function assign($sitePath, $siteName, $uri)
*/
public static function customSiteDriver($sitePath)
{
if (! file_exists($sitePath.'/SiteValetDriver.php')) {
if (! file_exists($sitePath.'/LocalValetDriver.php')) {
return;
}
require_once $sitePath.'/SiteValetDriver.php';
return 'SiteValetDriver';
require_once $sitePath.'/LocalValetDriver.php';
return 'LocalValetDriver';
}
/**