php - Laravel Class 'InterventionImageImageServiceProvider' not found

855

this question is asked many times and I did all the introductions I could found but I still get this error message.

I updated my config/app.php (

providers:

Intervention\Image\ImageServiceProvider::class,

aliases:

'Image' => Intervention\Image\Facades\Image::class,

and the composer.json

"intervention/image": "dev-master",

After this I did a composer update but my error message is still the same.. I'm using laravel 5

I did what the link says:

http://image.intervention.io/getting_started/installation

and yeah.. now I'm stuck

Another thing I dont understand is why they say I should write:

'Intervention\Image\ImageServiceProvider' 

in the provider array. Why the ' '? All the other elements in my provider array are written like this:

'Request'   => Illuminate\Support\Facades\Request::class,
'Response'  => Illuminate\Support\Facades\Response::class,
'Route'     => Illuminate\Support\Facades\Route::class,

so I removed the ' ' and addet ::class

the same with the aliases

I dont know if thats okay but maybe someone of you could help me

thanks for help

257

Answer

Solution:

The::class operator gives the fully qualified class name and was introduced in PHP 5.5 as you can see here. It's perfectly ok to use it if you have PHP >= 5.5.

I would suggest to check in the vendor directory if the package exists. I use"intervention/image": "^2.3" and everything's working great on L5.1

People are also looking for solutions to the problem: javascript - The best way to listen to external url JSON?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.