Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class KnownValetDriver extends BasicValetDriver
{
public function serves($sitePath, $siteName, $uri)
{
return is_file($sitePath . '/version.known');
}
public function isStaticFile($sitePath, $siteName, $uri)
{
return parent::isStaticFile(
$sitePath,
$siteName,
preg_replace('#^/(js|css)/[0-9]+/(.*)$#', '/\1/\2', $uri)
);
}
public function frontControllerPath($sitePath, $siteName, $uri)
{
$_SERVER['PHP_SELF'] = '/index.php';
return $sitePath . '/index.php';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.