souleye's avatar

using intervention image to resize in laravel 4

I installed intervention/image on a project that I inherited from other developers. actually, it was installed but I had to reinstall it. project was developed in laravel 4.

as per the instructions from the intervention documentation: open your Laravel config file config/app.php and add the following lines. In the $providers array add the service providers for this package.  `'Intervention\Image\ImageServiceProvider Add the facade of this package to the $aliases array. `'Image' => 'Intervention\Image\Facades\Image Now the Image Class will be auto-loaded by Laravel. these two steps have been properly done. in the section below, I inserted the code into routes.php. now what? when I went to my form to upload an image, apparently intervention is not working. I changed the image sizes to see if the changes would be reflected but no.

Route::get('/', function()
{
    $img = Image::make('foo.jpg')->resize(300, 200);
    return $img->response('jpg');

});```
any assistance will be appreciated. thank you.
0 likes
2 replies
AddWebContribution's avatar

I think you can clear the cache an try:

php artisan cache:clear
php artisan config:cache
php artisan cache:clear

Hope this work for you!

Please or to participate in this conversation.