Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The Laravel team provides Herd andphp.new for beginners, but senior engineers typically prefer managing each tool individually with a package manager. This gives you full version control and makes it easy to switch between different PHP versions across multiple projects.
This guide walks you through installing PHP, Composer, and Node.js (via nvm) using Homebrew, all the way to a working laravel new setup.
Target environment: macOS 13 Ventura or later. Works on both Apple Silicon (M1/M2/M3) and Intel.
Installing Homebrew
Homebrew is the package manager for macOS. If you haven’t installed it yet, run the following in your terminal:~/.zprofile). If you added it manually, reload your config:
Installing PHP
Install the latest PHP
The Homebrew
php formula always points to the latest stable version. Laravel 13 requires PHP 8.3 or higher.Installing Composer
Installing nvm
Node.js is installed per-user using nvm (Node Version Manager). Because noroot privileges are needed, it works well alongside AI tools and CLIs that rely on global npm packages.
Install nvm
Check the nvm GitHub repository for the latest install script.
Add the snippet to your shell config
The install script automatically appends the following to Apply the changes:
~/.zshrc (or ~/.bashrc). If it wasn’t added, do so manually:Installing Node.js
Verifying the Laravel Installation
Create a new project
Homebrew vs. Herd
| Manual Homebrew setup | Herd | |
|---|---|---|
| Target user | Developers who want fine-grained version and config control | Beginners and solo developers who want a quick start |
| PHP version switching | Manual via brew link | Easy switching from the GUI |
| Local domains | Manual /etc/hosts editing | Automatic .test domains |
| Service management | brew services | Start/stop from the GUI |
| Customizability | High | Limited |