jeudi 17 mai 2018

Laravel - Image saved in storage folder not showing to user

I have this code to save an image in the storage/app/uploads folder

 $image_main = Image::where('property_id', $id)->get();

$file = $request->file('file');
      $destinationPath = 'uploads';
      $i = 0;
      foreach ($file as $file1) {
          $i++;
          $extension = $file1->getClientOriginalExtension();
          $path = $file1->storeAs(
              $destinationPath, $i.time().".".$extension
          );

This is my blade file

@foreach ($image_main as $images)
        <img src="/storage/app/

The file saves in the storage/app/uploads folder but it doesn't show to the user, it says file not found. am I to set anything in the filesystems.php file



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire