Valet is a local development environment for Mac users that provides a simple and easy-to-use web server for Laravel applications. Valet uses Nginx and DnsMasq to automatically create local domains for all of your projects and provides a simple, hassle-free (usually) way to start developing Laravel applications on your local machine.
I recenly started gettting 504 from Laravel app using valet had some issues while debugging it. Basically it boils down to NGINX.
Go to ~/.config/Valet/nginx/Sites
Add these values to your