showing results for - "loop data from data base laravel to javascript"
Hana
12 Mar 2020
1this is how to loop data to javascript variable
2var locations = [
3    @foreach ($data as $i)
4         [ "{{ $i->name }}  " + "{{ $i->contact_city }}" , {{ $i->lat }},{{ $i->lng }},0, 'https://test.webshooter.se/app/competitions/'+{{ $i->id }}+ '/information'],
5         @endforeach         
6];
7
similar questions