Now you can install PHP and the Laravel installer with a single command
Last updated on by Yannick Lyn Fatt
When creating your first Laravel project you need to ensure you have PHP and Composer installed first. However, if you don't have these already installed it can be a little tedious for someone new. Well fear not, the Laravel team has you covered and based on feedback they received, have made the process more straight forward and simple. The official documentation was recently updated to include a single line command that will take care of everything for you. Whether you are on macOS, Windows or Linux it's a cinch to setup.
If you are on macOS just run:
/bin/bash -c "$(curl -fsSL https://php.new/install/mac)"
If you are on Windows then run:
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'))
And on Linux:
/bin/bash -c "$(curl -fsSL https://php.new/install/linux)"
Behind the scenes these commands take care of downloading and configuring your environment to run PHP, Composer and Laravel. That's it! You're good to go on your PHP and Laravel journey.
Note: If you would still like a more full-featured dev environment for PHP, check out Laravel Herd.