Custom Per-Site Drivers for Laravel Valet
Laravel Valet is an incredible tool for getting a local development environment running in no time at all.
It’s driver based, and each driver adds support for a different type of application, framework, CMS, etc.
If you’d like to add support for something that doesn’t yet exist, it’s pretty simple to create your own driver, and share it with the community.
For example, the Laravel driver assumes your web root is located in a
public directory. If you’ve renamed it to
public_html, Valet simply won’t recognize that it’s Laravel.
To remedy this, you can create your own local driver that applies for a single project.
Just follow the steps to create a driver, but name it
LocalValetDriver.php and place it in your project’s root directory.
class LocalValetDriver extends LaravelValetDriver
public function serves()
public function frontControllerPath($sitePath, $siteName, $uri)
You can either extend the base
ValetDriver class to write the whole driver from scratch, or extend an existing driver and just override what you need.