Using Brew, Composer, PHP 7.4.3 and Laravel 8.x
- Install Brew package manager
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install PHP using the command
brew install php
- If PHP is already installed, just run the command
brew upgrade php
to get the latest version
- If PHP is already installed, just run the command
- Install Composer using the command
brew install composer
- Using the command line, head to the folder where you want your project
- Now time to create the project, run the command
composer create-project --prefer-dist laravel/laravel example
- "Example" can be changed to whatever you want
- This might take couple of minutes, be patient
- Using the command line, go to your new project folder. Run the command
php artisan serve
. - Your server is now up and running on the listed IP-address.
- Homebrew-core is a shallow clone, urn the mentioned command to fix this issue.
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow