How do I place the ~/.composer/vendor/bin directory in your PATH using .zshrc

in whichever profile you're using (.zprofile or .profile or whatever), you would add the line:

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

then reload your profile

source ~/.zprofile

Update the file ~/.bashrc like this:

PATH="~/.composer/vendor/bin:{$PATH}"

If your PATH is in .bashrc file :

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

If your PATH is in .zshrc file :

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

Finally, you should restart your environment

source .bashrc #Bash

source .zshrc #ZSH

Tags:

Zsh

Laravel