mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 16:50:09 +01:00
Add Sculpin Valet driver
This commit is contained in:
28
drivers/SculpinValetDriver.php
Normal file
28
drivers/SculpinValetDriver.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class SculpinValetDriver extends StaticValetDriver
|
||||
{
|
||||
/**
|
||||
* Determine if the driver serves the request.
|
||||
*
|
||||
* @param string $sitePath
|
||||
* @param string $siteName
|
||||
* @param string $uri
|
||||
* @return void
|
||||
*/
|
||||
public function serves($sitePath, $siteName, $uri)
|
||||
{
|
||||
return is_dir($sitePath.'/.sculpin');
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutate the incoming URI.
|
||||
*
|
||||
* @param string $uri
|
||||
* @return string
|
||||
*/
|
||||
public function mutateUri($uri)
|
||||
{
|
||||
return rtrim('/output_dev'.$uri, '/');
|
||||
}
|
||||
}
|
||||
@@ -9,3 +9,4 @@
|
||||
require_once __DIR__.'/CraftValetDriver.php';
|
||||
require_once __DIR__.'/SymfonyValetDriver.php';
|
||||
require_once __DIR__.'/GenericPhpValetDriver.php';
|
||||
require_once __DIR__.'/SculpinValetDriver.php';
|
||||
|
||||
Reference in New Issue
Block a user