How to setup Laravel Installer Globally on your MacOS

Laravel Installer is a great command line tool, once you setup you can create new Laravel application anywhere using terminal.

Photo by Lewis Ngugi on Unsplash

Download the Laravel installer using Composer:

composer global require laravel/installer

Set composer’s $PATH so the laravel executable can be located by your system.

nano ~/.bash_profile

Paste following line in file

export PATH="~/.composer/vendor/bin:$PATH"

To save file CTRL+O and exit to from editor CTRL+X

Now run following command to install Laravel

laravel new my_project

The laravel new command will create a fresh Laravel installation on your current directory.