I'm using laravel 5.8 and intervention image to upload and resize an image.
I want to store this in storage/app/public/images
folder and I'm trying to use the storage facade to auto generate a unique name but the following doesn't work:
$file = $request->file('file');
$image = Image::make($file->getRealPath())->resize(360, 180);
Storage::disk('public')->putFile('images', $image->getEncoded());
Is it possible to auto generate unique file name using the storage facade for images similar to the when you upload normal files as follows:
Storage::disk('local')->putFile('forms', $request->file('file'));