找不到Laravel Intervention ImageServiceProvider

时间:2019-05-18 20:21:31

标签: php laravel-5 intervention

我在使用Laragon的本地主机上遇到了在线环境问题,一切正常。

My online environment
-- My composer version 1.8.5
-- My laravel version 5.8
-- My PHP version 7.3.0
-- Fileinfo support enable
-- GD Support enabled / Version bundled (2.1.0 compatible)
-- No Imagick PHP extension installed

我完全按照官方网站上的安装说明进行操作。

  1. php composer.phar需要干预/图像
  2. 添加config / app.php $ providers:Intervention \ Image \ ImageServiceProvider :: class
  3. 添加config / app.php $ alias:'Image'=> Intervention \ Image \ Facades \ Image :: class

问题现在开始。当我尝试运行该语句时:

$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"

我收到以下消息

[waservice@web7081 portal]$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"

In ProviderRepository.php line 208:
Class 'Intervention\Image\ImageServiceProvider' not found

Dump-autoload命令,我得到以下返回:

[waservice@web7081 ~]$ php composer.phar dump-autoload
Generated autoload files containing 0 classes

优化的dump-autoload命令,我得到以下返回:

[waservice@web7081 ~]$ php composer.phar dump-autoload -o
Generated optimized autoload files containing 156 classes

这是我的composer.json代码的一部分

"require": {
   "php": "^7.1.3",
   "fideloper/proxy": "^4.0",
   "laravel/framework": "5.8.*",
   "laravel/tinker": "^1.0",
   "intervention/image": "dev-master"
},

返回我的作曲家更新:

[waservice@web7081 ~]$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

返回我的作曲家安装

[waservice@web7081 ~]$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

返回干预映像安装命令

[waservice@web7081 ~]$ php composer.phar require intervention/image
Using version ^2.4 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

干预文件夹位于项目供应商文件夹中

我不知道会发生什么,在Internet搜索中我也找不到解决方案,总是与开发者自己网站上的指示相同。

1 个答案:

答案 0 :(得分:0)

检查在安装干预/图像时是否在正确的项目路线中。