Error while installing Laravel in Ubuntu

While trying to install Laravel in ubuntu 14.04 , it is  possible to occur errors. If you are using Laravel installer it will say "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable is found when you run the laravel command in your terminal". So to put this directory in PATH, type

export PATH="$PATH:$HOME/.composer/vendor/bin"
. You can add this to $HOME/.bashrc  or type
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc 
on the shell to automatically set the path for bash. To check if it works just logout and login or run
source ~/.bashrc 
on shell.

If you are installing a recent version of Laravel you should put

$HOME/.config/composer/vendor/bin 
on the PATH.