mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 16:50:09 +01:00
33 lines
675 B
PHP
33 lines
675 B
PHP
<?php
|
|
|
|
namespace Valet\Drivers\Specific;
|
|
|
|
use Valet\Drivers\BasicValetDriver;
|
|
|
|
class KatanaValetDriver 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 file_exists($sitePath.'/katana');
|
|
}
|
|
|
|
/**
|
|
* Mutate the incoming URI.
|
|
*
|
|
* @param string $uri
|
|
* @return string
|
|
*/
|
|
public function mutateUri(string $uri): string
|
|
{
|
|
return rtrim('/public'.$uri, '/');
|
|
}
|
|
}
|