tl;dr - I already did composer sump-autoload
Question: I am using Intervention Image library. I am updating an existing app that has an Image class that represents an image model. I wish to use the Intervention Image Image class by it's full namespace name.
I narrowed down the fault I wish to resolve to an empty test project with a single route:
Route::get('/{sugar}.jpg', function($sugar)
{
$path = 'C:/some-path/';
$img = Intervention\Image\Image::make($path . $sugar . '.jpg');
return $img->response('jpg');
});
This is the problematic line:
$img = Intervention\Image\Image::make($path . $sugar . '.jpg');
It results in:
Call to undefined method Intervention\Image\Image::make()
However, the namespace appears to be correct:
https://github.com/Intervention/image/blob/master/src/Intervention/Image/Image.php
And if I remove the namespace and do:
$img = Image::make($path . $sugar . '.jpg');
It works perfectly! Only that this would collide with the existing Image class in the real app.
Thanks for reading this far. Any suggestions on how to debug this namespace issue?