Install Laravel on your Mac

Dale Hurley Dale Hurley
2 min read

Install Laravel on your Mac in a few minutes

Laravel Tutorial
Install Laravel on your Mac

Development Environment:

Using Terminal, we will install Homebrew, PHP, Composer, Node and Laravel Installer.

Setting Up Your Dev Environment

We are assuming you are starting on a fresh machine.

Install Homebrew. Homebrew is the package manager for MacOS.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install PHP using Homebrew.

brew install php

Install Composer using Homebrew. Composer is the package manager for PHP.

brew install composer

Install Node using Homebrew. Node will provide you with NPM (Node Package Manager) and Yarn.

brew install node

Install Laravel Installer using Composer.

composer global require laravel/installer

Initialize your Laravel project

Let's build the project step by step, starting in the terminal.

Create a new Laravel project

laravel new app
  • Select React as the starter kit
  • Choose "Laravel's built-in authentication" for the authentication provider
  • Select "PEST" for the testing framework
  • Select "Yes" to "run npm install and npm run build"

Navigate to your new project

cd app

Fire it up

This will start the Laravel development server and open the application in your default browser.

composer run dev

You now have a Laravel applicationrunning at http://localhost:8000.