简体   繁体   English

Laravel 6 - 循环并显示刀片中的值

[英]Laravel 6 -loop through and display the values in blade

I want to loop through the values and display it in blade template (Array contains of results inside elements and then the values to fetch.我想遍历这些值并将其显示在刀片​​模板中(数组包含元素内的结果,然后是要获取的值。

在此处输入图片说明

In blade you should use blade's @foreach function:在刀片中,您应该使用刀片的@foreach函数:

@foreach($arr['result']['elements'] as $val)
    {{-- You ar in loop and write your html here --}}
@endforeach

Hope this helps you希望这对你有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM