Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

maarten's avatar

Trying to make use of the Laravel installer

Hi everybody,

I'm trying to make use of the Laravel installer. But when i type 'Larvel new' the command not found error is shown. In the documentation this is written: > Make sure to place the~/.composer/vendor/bin directory in your PATH so the laravel.

Hope some one can help me with this.

Thanks in advance.

Kind regards,

Maarten.

0 likes
12 replies
FrancescoZaffaroni's avatar
Level 6

If on mac (and think *nix) just run this in your terminal.

export PATH="~/.composer/vendor/bin:$PATH" 
12 likes
maarten's avatar

All,

Thanks for all the answers. It's working now.

1 like
ffab's avatar

Hi, Just my two cents on this question. to make this "path" permanently added to your environment, if your use bash you can edit ~/.profile or even base file for all users /etc/profile and add it there.

purdeve's avatar

it work on mac,type this syntax on your terminal

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc

wurdz's avatar

http://markvaneijk.com/the-fastest-way-to-install-laravel

MAC OSX El Capitan

Put an alias to the freshly installed Laravel installer in your user configuration .bashrc:

nano ~/.bashrc

And place this inside the file:

alias laravel='~/.composer/vendor/bin/laravel'

And run the following to make sure your bashrc profile is reloaded:

source ~/.bashrc
laravel new project
5 likes
lifesound's avatar

the problem is when i close the terminal i have to re export the path .. i don't know why. i'm using zsh

Jaytee's avatar

@lifesound Open a new thread next time.

You'll need to add it to your .zshrc file to persist it

1 like

Please or to participate in this conversation.