Tuesday, April 4, 2017

Laravel increment version number on update

I have a question about the best approach for using an auto versioning for one of my tables. The table I'm using has an id, but this is not an auto increment. In fact the same id is being used for the same object. The main differentiator is the version number. If want to increase it every time a new object with the same id is written to the database. What is the best way to achieve this?



via Erhnam

Advertisement