Reputation: 51
I want to retrieve image form database in laravel. I upload the image file into storage/public/images folder. For fetching image i create a link between storage and main public folder. When we execute php artisan storage:link command the storage folder is linked but the link storage folder create a shortcut. For this shortcut problem i can not retrieve data. how can i link storage folder to the public folder without creating shorcut.
@foreach ($data as $value)
<tr>
<td>{{ $value->id }}</td>
<td>{{ $value->product_name }}</td>
<td>{{ $value->produt_catecory }}</td>
<td><img src = "{{ Storage::url($value->product_image) }}"
style="height: 50px; width: 50px;" /></td>
<td>{{ $value->description }}</td>
</tr>
@endforeach
Upvotes: 0
Views: 197
Reputation: 1585
Assume your problem is windows creating a shortcut instead of symlink to the storage folder.
I found this discussions on laracasts:
https://laracasts.com/discuss/channels/laravel/storage-and-symbolic-links
which links to this article on how to create symlinks on windows.
https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
Upvotes: 0