Reputation: 609
i have lumen 8 installed on my host. i want to add image editor with Intervention. i did these:
run composer require intervention/image
in my pc and get 4 folders. intervention, ralouphie, psr, guzzlehttp
upload all generate files into vendor file
in bootstrap/app.php i add these:
$app->register('Intervention\Image\ImageServiceProvider'); class_alias('Intervention\Image\Facades\Image', 'Image');
when i run my code i got this error Class 'Intervention\Image\ImageServiceProvider' not found
i have check folder and it have path like this.
intervention/image/src/Intervention/Image/Facades
based on app->register path, i did reupload file from Intervention folder
Intervention/Image/Facades
i run it again and still have same error message
i still new with this setup. and most tutorial i found is installing on laravel not lumen. need help where i miss or wrong in this steps. or is there any advice for retrieve scaleable image with lumen.
Upvotes: 1
Views: 819
Reputation: 199
Try:
$app->withFacades(true, [ 'Intervention\Image\Facades\Image' => 'Image', ]);
$app->register(Intervention\Image\ImageServiceProvider::class);
Upvotes: 1