Posts by Alessandro Carvalho • 21 points
4 posts
-
0
votes0
answers25
viewsQ: Use the DB increment function to update from an array
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…
-
0
votes0
answers28
viewsQ: Transfer data from an Hidden input to a route
I have the score function of a control with the following code : public function score($ids, $points) { $score = Team::find($ids)->increment('points', $points) ; The $ids field will receive…
laravel-5.6asked Alessandro Carvalho 21 -
1
votes0
answers84
viewsQ: How to select a specific record from an array
I’m having the following problem. I dynamically created an array to receive some information. selections [2]{"2","alt-2-2"} [7]{"3","alt-7-3"} [8]{"1","alt-8-1"} Well, in the key I write the id in…
javascriptasked Alessandro Carvalho 21 -
0
votes0
answers608
viewsQ: Avoid memory overflow in a PHP function
Guys, I’m opening here and I have the following problem: I created a function with a hint that I found right here in stackoverflow. function DozenGenerate($game,$dozen) { $this->game = $game;…