laravel/homestead
Laravel Homestead is an official, pre-packaged Vagrant box that provides a complete local development environment for Laravel and PHP. It includes common tools and services, supports multiple projects, and runs consistently across macOS, Windows, and Linux.
laravel/homestead is a pre-configured Vagrant-based virtual machine tailored for Laravel development, offering a consistent, isolated environment with PHP, MySQL, Redis, and other dependencies pre-installed. It aligns perfectly with local development workflows for PHP/Laravel projects, ensuring parity between dev and production stacks.Homestead.yaml (e.g., PHP versions, ports, shared folders). Supports multiple sites per VM, enabling parallel development.8000:80) can cause conflicts if multiple VMs/sites are active.vboxmanage tweaks.pdo_mysql).vagrant up and validate:
http://homestead.app).~/Code → /home/vagrant/code).Homestead.yaml with docker-compose.yml..env for Docker-specific paths (e.g., DB_SOCKET → DB_HOST=mysql).Homestead.yaml overrides). Check Laravel’s PHP requirements.provision.sh.provision/laravel-homestead.sh.vboxmanage for tweaks (e.g., setextradata global guestproperty "EnableNestedVirtualization" 1).git clone https://github.com/laravel/homestead.git.vagrant up --provision (downloads ~1.5GB box).Homestead.yaml (sites, folders, PHP version).homestead app:link..env (e.g., APP_URL=http://your-site.test).vagrant ssh and php artisan serve (if needed).8080:80).provision.sh.gd, intl) must be manually added to provision.sh.vagrant destroy + vagrant up usually fixes it).vagrant reload --provision.vagrant destroy -f").sites in Homestead.yaml).| Failure | Impact | Mitigation |
|---|---|---|
| VM Crashes | Devs lose environment | Automate vagrant up in CI/CD. |
| Port Conflicts | Apps unreachable | Use vagrant reload --provision. |
| PHP Extension Missing | App errors (e.g., class not found) |
Add to provision.sh and reprovision. |
| Network Misconfiguration | Database/Redis unreachable | Verify Homestead.yaml host mappings. |
| Deprecation (Laravel 9+) | Blocked upgrades | Migrate to Sail; set deprecation timeline. |
How can I help you explore Laravel packages today?