command not found: laravel code example

Example 1: laravel command not found

echo 'export PATH="~/.config/composer/vendor/bin"' >> ~/.bashrc
# or
echo 'export PATH="~/.config/composer/vendor/bin"' >> ~/.zshrc

Example 2: laravel: command not found

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

source ~/.bashrc

Example 3: laravel command not found after installing laravel mac

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

Example 4: laravel: command not found

#these commands executed on Ubunyu 20.04
export PATH=~/.config/composer/vendor/bin:$PATH
source ~/.bashrc

Example 5: command not found: laravel

# For mac just run these 2 commands
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >>  ~/.zshrc
source ~/.zshrc

Example 6: laravel command not found ubuntu

composer global require "laravel/installer"