Trusting the Laravel Valet cert

If your local PHP processes don't trust the Laravel Valet certificate when communicating between sites, you need to add the certificate to Homebrew's cacert.pem file used by OpenSSL. These instructions are for macOS.

First get the Laravel Valet certificate.

cat ~/.config/valet/CA/LaravelValetCASelfSigned.pem | pbcopy

Then add it to the bottom of the local Homebrew cert (which is being used by OpenSSL).

vim /opt/homebrew/etc/ca-certificates/cert.pem

Restart the services with valet restart and you should be good to go. Hope it helps!