You could probably make your own driver based off of https://github.com/laravel/valet/blob/master/drivers/LaravelValetDriver.php
May 5, 2016
2
Level 26
Valet: Alternative PUBLIC Directory settings
I rename my public directory to html as the media template grid servers I use, use this naming convention, so doing this locally makes sure when i (manually upload yes, manually) all is the same as my local settings etc, and usually i can set up my sites on my homestead yaml setting page etc.
So is there away to add/edit other settings like this?
Level 26
@aarondfrancis yup! thats what I just did.
Called it MediaTempleValetDriver.php
For other here is what i did (nothing really but gives an idea what to do)
class MediaTempleValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return void
*/
public function serves($sitePath, $siteName, $uri)
{
if (file_exists($sitePath.'/html')) {
return true;
}
return false;
}
/**
* Determine if the incoming request is for a static file.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return string|false
*/
public function isStaticFile($sitePath, $siteName, $uri)
{
if (file_exists($staticFilePath = $sitePath.'/html/'.$uri)) {
return $staticFilePath;
}
return false;
}
/**
* Get the fully resolved path to the application's front controller.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return string
*/
public function frontControllerPath($sitePath, $siteName, $uri)
{
return $sitePath.'/html/index.php';
}
}
Please or to participate in this conversation.