Laravel / Intervention图像类 - 找不到类 [英] Laravel / Intervention Image Class - class not found

查看:2489
本文介绍了Laravel / Intervention图像类 - 找不到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚按照此处的说明安装了Intervention Image Class: http://image.intervention.io/getting_started/installation

I just installed Intervention Image Class following instructions from here: http://image.intervention.io/getting_started/installation

我还将这两行添加到config / app.php文件中:

I also added these 2 lines into config/app.php file:


'Intervention\Image\ImageServiceProvider'

'Intervention\Image\ImageServiceProvider'

'Image'=>'Intervention\Image\Facades\Image'

'Image' => 'Intervention\Image\Facades\Image'

当我打开我的网站时,收到此错误:

When I open my website, i get this error:

Class 'Intervention\Image\ImageServiceProvider' not found

为什么会这样,现在?

推荐答案

步骤1:



composer.json 文件中的require部分。

Step 1:

Add this to the "require" section of your composer.json file.

"intervention/image": "dev-master"
as;
    "require": {
    "laravel/framework": "4.1.*",
        "intervention/image": "dev-master"
    },



步骤2:



Step 2:

Run CMD;
$ composer install



步骤3:


$ b b

打开 config / app.php 文件。将此添加到 $ providers 数组。

Step 3:

open the config/app.php file. Add this to the $providers array.

'Intervention\Image\ImageServiceProvider'



步骤4:



下一步将此添加到$ aliases数组。

Step 4:

Next add this to the $aliases array.

'Image' => 'Intervention\Image\Facades\Image'



步骤5:



如果有错误;

Step 5:

If there is an error;

Class 'Intervention\Image\ImageServiceProvider' not found

请尝试

$ composer update

这篇关于Laravel / Intervention图像类 - 找不到类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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