未找到 Laravel 5 类“Intervention\Image\ImageServiceProvider”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34475855/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel 5 Class 'Intervention\Image\ImageServiceProvider' not found
提问by Stanis?aw Szewczyk
Hi I have problem with Intervention Image. When I use composer update
or
嗨,我有干预图像的问题。当我使用composer update
或
php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"
I have error:
我有错误:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Intervention\Image\ImageServiceProvider' not found**
[Symfony\Component\Debug\Exception\FatalErrorException]
找不到类“Intervention\Image\ImageServiceProvider”**
Have you idea? I did everything from http://image.intervention.io/getting_started/installationand I don't know what should I do now, please help me :)
你有想法吗?我从http://image.intervention.io/getting_started/installation做了所有事情,但我不知道我现在应该做什么,请帮帮我 :)
回答by Marcin Nabia?ek
Have you followed installation guide carefully ?
您是否仔细遵循安装指南?
You need to first run:
您需要先运行:
composer require intervention/image
and you should modify config.app.php
after you already install this package (so after composer require
) and not before.
并且你应该config.app.php
在你已经安装这个包之后进行修改(所以在之后composer require
)而不是之前。
回答by Sad?k Menduh A?ar
I solved by running
我通过运行解决了
php artisan config:clear
than:
php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"
比:
php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"