I have two tables:
table posts
id
text
table old_posts
id
post_id
text
version
the relation is one to many between post
and old_posts
when the user edits his/her post I save the old version in old_posts
but I need to increment the version number so I have first to get the maximum version for that post.
how I achieve this?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Tan54O
via IFTTT
Aucun commentaire:
Enregistrer un commentaire