laravel无法识别为内部或外部命令 [英] laravel is not recognized as an internal or external command

查看:179
本文介绍了laravel无法识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启动laravel

I'm trying to start laravel,

在他们的教程中找到以下行:

Found the following line in their tutorial:

确保将〜/.composer/vendor/bin目录放置在PATH中 因此,当您在 您的终端.

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.

我不知道该怎么办?

我在系统变量中添加了~/.composer/vendor/bin,然后尝试在命令行中使用"laravel new blog",但收到以下消息:

I added ~/.composer/vendor/bin to my system variables, and then tried using 'laravel new blog' in the command line but got the following message :

laravel is not recognized as an internal or external command

我该怎么办?

推荐答案

对于Windows,添加

For Windows add

C:\Users\MyUserName\AppData\Roaming\Composer\vendor\bin 

通过进入我的电脑">属性">高级">环境>变量">路径"

...进入目录.

... to directory by going to "My Computer" > "Properties" > "Advanced" > "Environment > Variables" > "Path".

注意:MyUserName是您的PC用户名.

Note: MyUserName is your pc username .

重新启动PC,它将可以正常运行

Restart your PC and it would work

这篇关于laravel无法识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆