We often prefer working with Laravel Valet over working with Trellis. This as Trellis runs Vagrant which runs VirtualBox. Very heavy all that while you could use Laravel Valet which uses the resources your Mac has and only needs some extras using Homebrew.
Trellis Valet Driver
Now, there is a package you can use to keep the site and trellis directories and run your Bedrock based site in Laravel. It is called the Trellis Valet Driver . You simply download the driver and add it to ~/.config/valet/Drivers . Then you do a valet restart and link the site directory.
Issues
Once I added this driver I did a valet restart
and then I had some issues. I did a
valet link in root project
and then removed it as that did not work and should not. So I did it in the site folder where the site files and Bedrock reside. But I only got a timeout
This site can’t be reached
and no Nginx Users/jasper/.config/valet/Log/nginx-error.log";
or PHP FPM logs at /usr/local/var/log/php-fpm.log
referring to it. Then I started wondering if vagrant suspend
did remove the hosts file data too. It did not so I commented it
## vagrant-hostmanager-start id: 0b926f9c-843a-4a87-9b5f-e79a1ae5ba23
# 192.168.50.36 site.test
# 192.168.50.36 www.site.test
## vagrant-hostmanager-end
Once I did that I started having a database connection issue
Warning: mysqli_real_connect(): (HY000/1045): Access denied for user 'user'@'localhost' (using password: YES) in /Users/jasper/code/site.com/site/web/wp/wp-includes/wp-db.php on line 1531
So I knew it was working. Just hadn’t added the database to the Homebrew MariaDB SQL server.