Reputation: 3
I want to show one or more JPG files with a button, I use a foreach
loop to show these images but currently I get 2 buttons when I have 2 files. How can I get only one button even if I have multiple images.
@foreach($letter->documents AS $document)
@for($page = 1; $page <= $document->pages; $page++)
<input onclick="window.open('{{ '/send/'.$letter->id.'/documents/'.$document->id.'/'.$page.'/778x1008'}}')" value="View PDF example" type="button" class="left"></input>
@endfor
@endforeach
Upvotes: 1
Views: 842