Prerequisites for Laravel 12.x
Laravel requires:
- PHP 8.4+
- Composer
- Node.js and NPM (or Bun)
Install on macOS/Linux:
/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)" # or linux/8.4
Windows PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.4'))
Install Composer globally if needed: composer global require laravel/installer
Optional: Use Laravel Herd (https://herd.laravel.com/) for easy local PHP/DB setup.
Verify: php --version, composer --version, node --version.