Install Homebrew package manager.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 1: Install Laravel Valet
Install Laravel Valet command line globally using the composer command line.
composer global require laravel/valet
Step 2: Install Multiple PHP Versions
By default, you might only have 1 PHP version and you can install the other PHP versions with Homebrew. First, search the available PHP versions.
brew search php
brew install php brew install [email protected] brew install [email protected]
Step 3: Switch PHP Version
Now that you have all the other PHP versions you can easily switch PHP versions. If you want to switch to PHP version 7.3 you can use the command below.
valet use [email protected]
valet use php