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.
Asked
Active
Viewed 120 times
-2
-
try this one `foreach($data['result']['elements'] as $el){}` – Joseph Feb 28 '20 at 08:31
-
You should check Laravel docs which is very well done: https://laravel.com/docs/6.x/blade#loops – kerwan Feb 28 '20 at 08:53
-
Does this answer your question? [For-each over an array in JavaScript?](https://stackoverflow.com/questions/9329446/for-each-over-an-array-in-javascript) – Gihan Saranga Siriwardhana Feb 28 '20 at 10:24
1 Answers
1
In blade you should use blade's @foreach
function:
@foreach($arr['result']['elements'] as $val)
{{-- You ar in loop and write your html here --}}
@endforeach
Hope this helps you

Malkhazi Dartsmelidze
- 4,783
- 4
- 16
- 40