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

harshamv's avatar

Laravel command not found by ZSH on MacOS

I am getting the error

zsh: command not found: laravel

I tried the other answers from the answered questions but they seem be old and do not work. I am on Mac with macOS Mojave.

I have the following in the ~/.zshrc files

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/harshamv/.composer/vendor/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export PATH="$HOME/.composer/vendor/bin:$PATH"
0 likes
3 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Did you install it globally?

composer global require laravel/installer
4 likes
marcellopato's avatar

I did installed using composer global require laravel/installer nut still got error: -bash: laravel: command not found

1 like

Please or to participate in this conversation.