1
我想用一个按钮显示一个或多个JPG文件,我使用foreach
循环来显示这些图像,但是当我有2个文件时,我现在得到2个按钮。即使我有多个图像,我如何只能获得一个按钮。Laravel blade button foreach
@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
欢迎SO。请阅读这个[how-to-ask](http://stackoverflow.com/help/how-to-ask)并遵循那里的指导原则,用附加信息来完善您的问题,例如代码和错误消息来描述您的编程问题。 – thewaywewere