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.

8
  • show your $PATH output Commented Dec 16, 2015 at 12:12
  • /c/xampp/php:~/.composer/vendor/bin Commented Dec 16, 2015 at 12:14
  • do you see laravel in that path? I do agree with @Koga Commented Dec 16, 2015 at 12:22
  • I've copy-pasted the exact location of the file and echoing the $PATH variable shows the exact same location. But still won't let that command. Commented Dec 16, 2015 at 12:33
  • No, there's no 'laravel' in that path.. Commented Dec 16, 2015 at 12:36

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.
2

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.