6 months ago

Send laravel value to JS value

Posted 6 months ago by tedaaron

I have a foreach in a blade that loops through an array as follows :

@foreach($qwin as $qwinners)

     <a href="" >{{$qwinners->title}}</a> 


The above loop will result in 5 values. I want to store each of the 5 values in 5 Javascript variables to be used after that in javascript functions. How can this conversion be done in a blade?

Please sign in or create an account to participate in this conversation.