mardi 26 mai 2020

Images not getting displayed in laravel blade view

I'm trying to display multiple images from public folder to laravel blade view. But its not getting displayed.

Here is my view code.

<div class="card-body">
  <table class="table">
   <thead>
     <th>Image</th>
     <th>Title</th>
   </thead>
   <tbody>
      @foreach($posts as $post)
       <tr>
         <td><img src="" width="60px" height="60px" alt=""></td>
         <td></td>
       </tr>
      @endforeach
   </tbody>

  </table>

</div>

Its anyway showing title. I thought it may be an issue with url so i tried possible urls to see the image. But this is the most accurate one

<td><img src="http://127.0.0.1:8000/posts/TNL0RZhSi0zkmdBS3IAZodv0dqNEeVT4LbJ6GJk2.jpeg" width="60px" height="60px" alt=""></td>

So most possibly the issue is Public folder is not accessble. But i have tried pup artisan storage:link Itried every possible answer in SO,but no luck

Laravel Framework 5.8.38



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire