What if user wants to edit a posts tags?lets say we have a table to save tags .each tag has anid, post_id along its name. when user remove one tag in update page , application needs to know which tag is removed to delete it from database table. i mean in addition to tags name ,its id should be tied to it too. may be using checkbox solve the issue:
<input type="checkbox" name ="tags[tag id]" value="tag name">
we should have something like this array in request when form is submitted:
POST[
'tags'=> [ 'id' => 'name']
]
having tag id in update page is very important , otherwise application cant distinguish which tags have been updated!
What if user wants to edit a posts tags?lets say we have a table to save tags .each tag has an
id
,post_id
along itsname
. when user remove one tag in update page , application needs to know which tag is removed to delete it from database table. i mean in addition to tags name ,its id should be tied to it too. may be using checkbox solve the issue:we should have something like this array in request when form is submitted:
POST[ 'tags'=> [ 'id' => 'name'] ] having tag id in update page is very important , otherwise application cant distinguish which tags have been updated!