Laravel:我安装干预,但总是在编码时找不到类干预

I have followed step by step the installation according to the web docs for intervention:

1) First I installed the latest version

$ php composer.phar require intervention/image

I have even repeated that step several times and I get the usual:

loading composer repositories, updating dependencies, nothing to install or update

2) Then I went to composer json and added this to providers

'Intervention\Image\ImageServiceProvider'

and this to facades

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

then I repeated composer update

I also did composer dump auto-load

and nothing. Whenever I try to used it on my docs it will tell me Class Intervention not found if I specifically use it like

Intervention::make('images/' . $filename . '.' . $extension);

If I do it otherwise like

$here = $image->move(public_path().'/img/gallery', $name); //to get the source of the uploaded file

Image::make($herei->resize('200','200')->save($name));

then it will tell me that it doesn't know what "resize" is, so, not a clue of Intervention.

I am flummoxed, been trying for 8 hours non-stop. Yes, I know there is a similar question here but the solution they provide is nothing new to what I have already done.

There's no Intervention class. All calls are made to Image.

$image = Image::make('images/' . $filename . '.' . $extension);

Your second example doesn't work because you have to make an intervention image object before using resize()

Image::make($here)->resize('200', '200')->save($name);

Please read the official documentation for more information