mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
- Extract much of server.php into a `Server` class - Move all but the Laravel and Basic drivers into a subfolder - Load all but the Laravel and Basic drivers via glob - Add `beforeLoading` hook to simplify the `frontControllerPath` method for some drivers
33 lines
682 B
PHP
33 lines
682 B
PHP
<?php
|
|
|
|
namespace Valet\Drivers\Specific;
|
|
|
|
use Valet\Drivers\BasicValetDriver;
|
|
|
|
class JigsawValetDriver extends BasicValetDriver
|
|
{
|
|
/**
|
|
* Determine if the driver serves the request.
|
|
*
|
|
* @param string $sitePath
|
|
* @param string $siteName
|
|
* @param string $uri
|
|
* @return void
|
|
*/
|
|
public function serves(string $sitePath, string $siteName, string $uri): bool
|
|
{
|
|
return is_dir($sitePath . '/build_local');
|
|
}
|
|
|
|
/**
|
|
* Mutate the incoming URI.
|
|
*
|
|
* @param string $uri
|
|
* @return string
|
|
*/
|
|
public function mutateUri(string $uri): string
|
|
{
|
|
return rtrim('/build_local'.$uri, '/');
|
|
}
|
|
}
|