antiquarian_capsaicin
Displaying multiple images uploaded from SpatiesMediaLibrary intp a blade file
SpatieMediaLibraryFileUpload::make('images')
->multiple(),
Blade File
@foreach ($item as $item)
<div class="bg-white p-6 rounded-md shadow-md transition-transform transform hover:scale-105">
<img src="{{$item->images}}" alt="Card Image" class="w-full h-32 object-cover mb-4 rounded-md">
<h3 class="text-xl font-semibold mb-2">{{$item->name}}</h3>
<p class="text-gray-700">{{$item->name}}</p>
<a href="{{url('details', $item->id)}}">
<button class="mt-4 bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 transition-colors">Learn
More</button>
</a>
</div>
@endforeach
Images don't show up in the blade file
5 replies