Cookies ahead

Our support chat tool "Intercom" would like to collect some more data on you. See the related link for more details.

Docs

Laravel Valet

Reviewedbyfl

Markdown ↓

👨‍✈️

Valet at your service.

A macOS local development environment for Laravel and other PHP frameworks.

Laravel Valet is an easy-to-use local development solution for Laravel developers and others on macOS. It's a command-line tool installed via the Terminal, bundling NGINX, DnsMasq, and other utilities into a convenient CLI.

Installation

Best installed via Homebrew; requires PHP and Composer.

# Install Valet via Composer
composer global require laravel/valet
bash

Examples

# Run the installer
valet install

# Park: Register a directory for all your projects
cd ~/Sites
valet park
# Now ~/Sites/my-project is available at http://my-project.test
# The `park` command registers a directory on your machine that contains your applications. All directories within that directory will be accessible in your web browser at `http://<directory-name>.test`.

# Link: Serve a single site
cd ~/path/to/project
valet link
# Now available at http://project.test
# The `link` command is useful if you want to serve a single site in a directory and not the entire directory.

# Secure: Serve over HTTPS
valet secure my-project
# You can serve your sites over encrypted TLS using HTTP/2 with the `secure` command.

# PHP Versions: Switch globally or per site
valet use php@8.5
cd ~/Sites/legacy-project
valet isolate php@7.4
bash

Database

Valet does not include a database management tool.

Working with fortrabbit

Since Valet runs directly on your host machine, it uses your local SSH keys by default.

Graphical interface

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗