Skip to content

Instantly share code, notes, and snippets.

@kvnm
Created September 7, 2016 02:32
Show Gist options
  • Save kvnm/b4c2e237a62988902490042aadbce8b8 to your computer and use it in GitHub Desktop.
Save kvnm/b4c2e237a62988902490042aadbce8b8 to your computer and use it in GitHub Desktop.
Valet driver for Drupal that allows a custom web directory.
<?php
class UntoldDrupalValetDriver extends DrupalValetDriver {
private function documentRoot($sitePath) {
return $sitePath . '/drupal';
}
public function serves($sitePath, $siteName, $uri) {
return parent::serves($this->documentRoot($sitePath), $siteName, $uri);
}
public function isStaticFile($sitePath, $siteName, $uri) {
return parent::isStaticFile($this->documentRoot($sitePath), $siteName, $uri);
}
public function frontControllerPath($sitePath, $siteName, $uri) {
return parent::frontControllerPath($this->documentRoot($sitePath), $siteName, $uri);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment