1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 08:40:09 +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) public static function assign($sitePath, $siteName, $uri)
{ {
$drivers = []; $drivers = [];
if ($customSiteDriver = static::customSiteDriver($sitePath)) { if ($customSiteDriver = static::customSiteDriver($sitePath)) {
$drivers[] = $customSiteDriver; $drivers[] = $customSiteDriver;
} }
$drivers = array_merge($drivers, static::driversIn(VALET_HOME_PATH.'/Drivers')); $drivers = array_merge($drivers, static::driversIn(VALET_HOME_PATH.'/Drivers'));
$drivers[] = 'LaravelValetDriver'; $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. * 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) public static function customSiteDriver($sitePath)
{ {
if (! file_exists($sitePath.'/SiteValetDriver.php')) { if (! file_exists($sitePath.'/LocalValetDriver.php')) {
return; return;
} }
require_once $sitePath.'/SiteValetDriver.php'; require_once $sitePath.'/LocalValetDriver.php';
return 'SiteValetDriver'; return 'LocalValetDriver';
} }
/** /**