Drupal + Laravel Valet
Valet is a Laravel development environment for Mac minimalists. No Vagrant, no /etc/hosts file. You can even share your sites publicly using local tunnels. Out of the box, Valet supports Drupal. So, lets setup Valet and Drupal.
Configure Valet
- Clone/install your Drupal project into the Valet sites directory.
- Create
LocalValetDriver.php
with the next content: - Change
possibleSubdirectories()
function according to your preferences. - Profit!
Change the domain
If you would like to change the URL of the site, you need to add the next line to your /etc/hosts file:
127.0.0.1 my-new-url.com
Then, create a symbolic link with the domain
ln -s my-project-folder my-new-url.com
Issues
A problem with $_GET['q'], 'q' query parameter, clean URLs
You need to check the frontControllerPath
function from the LocalValetDriver.php
:
For example, if you are expecting a problem with '?q' parameter while requesting the /jsonapi/some-page
path, the following quick and dirty hack can be used:
Valet Nginx 502 Bad Gateway error
Check this.