0
Here’s what it is: I have a javascript array with the id I want to increment usingDB::table('team').increment->('points', 1000).
How should I make my controller take this array and increment only the id on it?
0
Here’s what it is: I have a javascript array with the id I want to increment usingDB::table('team').increment->('points', 1000).
How should I make my controller take this array and increment only the id on it?
Browser other questions tagged javascript laravel-5 laravel-5.6
You are not signed in. Login or sign up in order to post.
you are sending how? if you have javascript code?
– novic
That’s it. In the script I write in an array and I can send it to an Hidden input by separating each id by commas. But I have no idea how to send this to my controller. I created a score() function but could not implement it to receive this data
– Alessandro Carvalho
Put the script you save the array to?
– novic
var id = $(this).attr('id');
 var selected = id.charAt(id.length-5);
 var team = id.charAt(id.length-3);
 var order = id.charAt(id.length-1);
 selections[order] = [parseInt(team),parseInt(selected),id];
– Alessandro Carvalho