Answers for "loop data from data base laravel to javascript"

0

loop data from data base laravel to javascript

this is how to loop data to javascript variable
var locations = [
    @foreach ($data as $i)
         [ "{{ $i->name }}  " + "{{ $i->contact_city }}" , {{ $i->lat }},{{ $i->lng }},0, 'https://test.webshooter.se/app/competitions/'+{{ $i->id }}+ '/information'],
         @endforeach         
];
Posted by: Guest on September-05-2021

Code answers related to "loop data from data base laravel to javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language