samedi 19 mai 2018

Croping image with intervention

I'm trying to crop the image before or after it's uploaded, I didn't have any luck so far. before we start, I should say I have no experience with this stuff. here is the code I tried and didn't work:

$file->move('storage/profil', $fileNameToStore)->crop(100, 100, 25, 25);

I do not understand how this thing should work but tried some basic methods to work it around. there are examples in the website like:

$img = Image::make('public/foo.jpg');
$img->crop(100, 100, 25, 25);

But when I try it, it eather does not find make or crop.

use Intervention\Image\Facades\Image;

is included at the top. I think this shouldn't be an issue. any help is appreciated in advance.

Laravel 5.4



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2IQtK0O
via IFTTT

Aucun commentaire:

Enregistrer un commentaire