I’ve recently started to learn Laravel and pretty early on the course introduced me to local development, by local I mean directly off the machine, rather than using a tool or VM (Homestead) as I had been doing. The tool introduced was Valet, it’s described in their documentation as ‘a Laravel development environment for Mac minimalists.’ Naturally, my next thought was ‘if I can run a Laravel application locally, why do I need MAMP or Homestead to run WordPress sites?’ — and thus I set out to see if this was possible.
Homebrew is a package manager for MacOS, through this we can install PHP, MySQL and a whole load of other packages —you can search them all here.
This is pretty straightforward — all we need to do is open up the Terminal and run this command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" .
Now we know Valet is working we need to tell it where our projects are and this is were we want to generate domains — to do this just navigate to your project folder (using the CLI), for example I’d go /Documents/Projects/ and then you’ll just need to run the valet park command.