简体   繁体   English

新的 Laravel 安装,Artisan 不工作

[英]Fresh Laravel Install, Artisan Not Working

I have freshly installed Laravel as well as a new project, which I am assuming is a new project because the Laravel folder has the vendor folder which contains Artisan.我刚刚安装了 Laravel 以及一个新项目,我假设它是一个新项目,因为 Laravel 文件夹具有包含 Artisan 的供应商文件夹。

Now, when I try to run the $ php artisan list I get a command not found.现在,当我尝试运行$ php artisan list我发现找不到命令。 Oh and yes I am routing to the correct folder where Laravel is installed.哦,是的,我正在路由到安装 Laravel 的正确文件夹。

I am using GitBash to run these commands!我正在使用 GitBash 来运行这些命令!

Thank you!谢谢!

command not found means PHP is not installed or PATH variable doesn't have path to php . command not found意味着未安装 PHP 或 PATH 变量没有php路径。 So, it actually not a Laravel problem.所以,它实际上不是 Laravel 的问题。

What you need is install PHP (if you didn't do that) and set PATH variable.您需要的是安装 PHP(如果您没有这样做)并设置 PATH 变量。

Tutorial for Windows: Windows 教程:

https://john-dugan.com/add-php-windows-path-variable/ https://john-dugan.com/add-php-windows-path-variable/

For Linux:对于 Linux:

http://www.linuxnix.com/how-to-set-a-php-path-in-linux/ http://www.linuxnix.com/how-to-set-a-php-path-in-linux/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM