dimanche 28 octobre 2018

Table Data Update Depends on ID

I have a table where user needs to enter the data. Multiple rows should be updated when user clicks on submit. Have added hidden input box and managed to get the Data in an array.

Here is the data -

array:5 [▼
 "_token" => "gzgYYJLtuDT5lgxrxBq4BsJj2SEFyg0xLS4JUwn0"
 "id" => array:2 [▼
  0 => "1"
  1 => "2"
]
"locations" => array:2 [▼
  0 => "13.0717898,77.621292"
  1 => "13.0717898,77.621292"
]
"location" => array:2 [▼
  0 => "k1"
  1 => "k2"
]
"submit" => "submit"
]

I have a table called Representative location.

I just want to replace locations[0] (lat/long) with k1 based on the ID(1) Same way, want to replace locations[1] (lat/long) with k2 based on the ID(2).



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2OcxgkJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire