'Class "intervention\image\Facades\image" not found
I am attempting to automatically resize images using the intervention package but I keep on getting the error when I go back to my browser page. I have already added Intervention\Image\ImageServiceProvider::class, to the providers section and, 'Image' => Intervention\Image\Facades\Image::class, to the aliases section of config/app.php file.
if($request->hasfile('image'))
{
$imagePath = $request->file('image');
$extension = $imagePath->getClientOriginalExtension();
$filename = time().'.'.$extension;
$imagePath->storeAs('uploads/public/', $filename);
}
$image = Image::make("uploads/public/($imagePath)")->fit(1200,1200);
$image->save();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
