Tengo un problema con el almacenamiento en Storage Utilizando Image Intervention. Actualmente tengo mi codigo funcional, el problema es que necesitor hacer crop a la image para redimencionarla.
$file = $request->file('avatar');
$path = Auth::user()->id . '/' . $type__acount . '/';
File::isDirectory($path) or File::makeDirectory($path, 0777, true, true);
$avatar = Storage::disk('public')->put($path , $file);
Implementando Image Invention
$file = $request->file('avatar');
$path = Auth::user()->id . '/' . $type__acount . '/';
$crop = Image::make($file);
$crop->resize(100, 100, function($constraint){
$constraint->aspectRatio();
})->encode('jpg');
File::isDirectory($path) or File::makeDirectory($path, 0777, true, true);
$avatar = Storage::disk('public')->put($path , $crop);
Pero me arroja un "message": "file_put_contents(/home/kllaar/public_html/api_service/public/storage/866851/trainer): failed to open stream: Is a directory",
¿Alguien sabe que esta sucediendo?