3

I've recently installed composer and also installed laravel installer from composer from the commmand line just like they said in laravel documentation. But when I used the laravel command on the command line, it show error:

sh.exe": laravel: command not found

I also added environment variable in the path variable.

~/.composer/vendor/bin

But still the same error occurs while using the laravel command. I'm a laravel newbie and I'm stuck in laravel installation.I've searched lot of times but still could not get the solution. I've read lot of users' questions with the same problem and used their solutions but still could not fix this.

Birendra Gurung
  • 2,168
  • 2
  • 16
  • 29

2 Answers2

6

Your path /c/xampp/php:~/.composer/vendor/bin is definitly wrong. Either you have to fix it (should be something like C:/{path_to_your_composer_directory}) or you can simply use composer create-project laravel/laravel --prefer-dist to install a new laravel project.

I would go with the 2nd option, because you don't have to configure something else.

Koga
  • 555
  • 1
  • 5
  • 18
  • I've add the exact same location on the environment variable but still the same error is shown. The second option would be great if there's no need for the `laravel` command any more in further development using the framework. Any way worked out the second way. – Birendra Gurung Dec 16 '15 at 12:44
2

On windows system, please remove . from path (just before .Composer)

infernaze
  • 61
  • 1
  • 6