0

I'm saving image file in storage folder, its working fine

$ext = "jpg";
$imageConvert = \Image::make($image->getRealPath())->stream($ext, 60);
            $img = rand(10, 100) . '_piku.' . $ext;
            \Storage::put('public/piku/' . $img, $imageConvert);

But I want to store images in direct public/piku folder instead of storage/app/public/piku

So how can I do that?

I have tried all these: click here But these methods not work for case of intervention stream.

Loveyatri
  • 11
  • 3

1 Answers1

1

try using public_path function:

The public_path function returns the fully qualified path to your application's public directory.

$imageConvert->save(public_path('piku/' . $img));
OMR
  • 11,736
  • 5
  • 20
  • 35