Fetch all images in a block
How do you fetch all the images in a block? For e.g i have this block <x-twill::medias
name="slide"
label="Slide Show Image"
max=10
/>
I want to render this block into a slideshow. However this doesn't work
@foreach ($block->images('slide') as $image )
<img class="shadow-2xl" src="{{$image('highlight', 'default')}}"/>
@endforeach
Help would be appreciated.
3 Replies
Actually now that i had a look at it, it isn't storing any images
@.zeenux Did you define the image and crop in
config/twill.php
, or in the block class?yes i did