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

tweaks to drivers. add jigsaw

This commit is contained in:
Taylor Otwell
2016-05-05 14:47:34 -05:00
parent 7d8a3e47a6
commit e0da86d2eb
4 changed files with 46 additions and 3 deletions

View File

@@ -44,14 +44,15 @@ public static function assign($sitePath, $siteName, $uri)
{
$drivers = static::driversIn(VALET_HOME_PATH.'/Drivers');
$drivers[] = 'StatamicValetDriver';
$drivers[] = 'LaravelValetDriver';
$drivers[] = 'StatamicValetDriver';
$drivers[] = 'JigsawValetDriver';
$drivers[] = 'StaticValetDriver';
foreach ($drivers as $driver) {
$driver = new $driver;
if ($driver->serves($sitePath, $siteName, $uri)) {
if ($driver->serves($sitePath, $siteName, $driver->mutateUri($uri))) {
return $driver;
}
}
@@ -82,6 +83,17 @@ public static function driversIn($path)
return $drivers;
}
/**
* Mutate the incoming URI.
*
* @param string $uri
* @return string
*/
public function mutateUri($uri)
{
return $uri;
}
/**
* Serve the static file at the given path.
*