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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user