I have a checkbox array that has its values stored as JSON in a database, I want to get the old value or the stored value in the database. here is the code I wrote.
It did not work as I expected, is there a best practice to deal with this issue?
<?php $savedDevices = json_decode(Auth::user()->devices, true);?>
<input type="checkbox" name="devices[Android Phone]" value="1" > Android Phone </label>
<input type="checkbox" name="devices[Android Tablet]" value="1" > Android Tablet </label>
<input type="checkbox" name="devices[iPhone]" value="1" > iPhone </label>
<input type="checkbox" name="devices[iPad]" value="1" > iPad </label>
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1rpDmmp
via IFTTT
Aucun commentaire:
Enregistrer un commentaire