If you are a PHP developer and use Mac OSX for day to day development, then you need to try Laravel Valet. Once you try laravel valet, you will never go back to using MAMP or default LAMP on Mac for development. If you have used the default LAMP or MAMP on mac you definitely understand the pain of creating virtual hosts for the different applications that you work on, in your day to day life. Laravel Valet makes creating virtual hosts a breeze as it takes care of the DNS using dnsmasq. You can get up and running in no time by following the installation instructions provided here.

Now comes the main reason for writing this article, using Laravel Valet for Moodle development. I have been developing on Moodle for about 10 years now and use Mac OSX as my primary development environment. Laravel valet supports various applications by providing something called drivers and out of the box, has the following drivers:


To make Moodle work with Laravel valet, I just wrote a driver and thought of sharing it with other Moodle developers out there that use MAMP or other virtual server with Mac. Below is the Moodel driver that I wrote. Just add it to ~/.valet/Drivers dirtory as MoodleValetDriver.php and you should be good to go. I have tested this with upto Moodle 3.3. Give it a try and let me know if anyting else needs to be added.

Happy coding 🙂