Skip to content

Instantly share code, notes, and snippets.

@vaporwavie
Last active February 10, 2018 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaporwavie/9c2cfb9d36fce5a8a683641d87bf9d90 to your computer and use it in GitHub Desktop.
Save vaporwavie/9c2cfb9d36fce5a8a683641d87bf9d90 to your computer and use it in GitHub Desktop.
fix laravel shortcut

If you're using Ubuntu 16.04.

You need to find the composer config files in my case is: /.config/composer or in other cases ~/.composer/. you can see the dir after this command: composer global require "laravel/installer" After Laravel Installed you can find your laravel in /.config/composer/vendor/laravel/installer/ and you will find the Laravel shortcut command in here : /.config/composer/vendor/bin/

set your .bashrc (or .zshrc) using nano ~/.[bash|zsh]rc and export your composer config file:

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

or you can use alias. but above solution is recommended.

alias laravel='~/.config/composer/vendor/laravel/installer/laravel'

Now refresh your bashrc using source ~/.bashrc and then laravel is ready!!

Source: https://stackoverflow.com/a/41476969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment