Skip to content
Advertisement

Laravel 8: How To Use Intervention Image Library Properly

I want to use Intervention Image library for my Laravel project, so I just installed it via Composer and added this line of code to config/app.php:

JavaScript

And also this line was added to aliases part:

JavaScript

Now at my Controller I coded this:

JavaScript

But as soon as I fill my form to check if it’s work or not, this error message pops up:

Error Class ‘AppHttpControllersAdminImage’ not found

Which means this line:

JavaScript

So why it returns this error while I’ve included it already in my project ?!

If you know, please let me know… I would really appreciate that.

Thanks

Advertisement

Answer

On config/app.php you need to add :

JavaScript

And,

JavaScript

Now you can call use Image; on the top on your controller :

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement