Local development with Laravel Valet
Published
Updated
👨✈️
Valet at your service.
Laravel Valet is a free command line tool for macOS that serves every project folder as a .test domain, with NGINX and DnsMasq running in the background.
Laravel Valet runs PHP natively on macOS, without containers or virtual machines. It works for Laravel and most other PHP frameworks and CMS. Valet is open source under the MIT license.
Installation
Valet needs Homebrew, PHP and Composer.
brew install php
composer global require laravel/valet
valet install
Usage
# Serve every folder in ~/Sites as <folder>.test
cd ~/Sites
valet park
# Serve a single project folder as project.test
cd ~/path/to/project
valet link
# Serve a site over HTTPS
valet secure my-project
# Switch PHP globally, or for one site
valet use php@8.5
cd ~/Sites/legacy-project
valet isolate php@7.4
Database
Valet includes no database. Install MySQL with Homebrew, brew install mysql, or use DBngin.
Working with fortrabbit
Valet runs on the host system and uses the local SSH keys in ~/.ssh for git and SSH access to fortrabbit. PHP Monitor adds a menu bar interface for Valet.