Laravel php artisan 无效

Laravel php artisan doesn't work

我正在尝试在我的 laravel 目录中使用 php artisan,但它给出以下警告

PHP Warning:  require(/home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/autoload.php on line 17
PHP Fatal error:  require(): Failed opening required '/home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/autoload.php on line 17

试试 composer update 我想这会解决你的问题

运行 作曲家 --no-scripts

composer update --no-scripts 

转到命令提示符设置项目路径,然后键入此命令:

composer install

它将自动安装 vendor/ 中的所有依赖项。

尝试:

cd /home/mahmoud/Desktop/Learning/laravel/blog
composer install

你应该会在blog目录下看到vendor文件夹,如果还是有问题执行composer du