How to implement calculated properties in Doctrine ORM?
There is a date field in a table but when retrieving data you need to including seconds back (time() - $timestamp). If understand correctly, you need to entice new property to have, and in it refer to the date. How to do it correctly?
I think that it is the task of doctrine to form you an idea of the date. you can search and write custom extension for tviga that will generate you the desired entry (perhaps with translations) from the DateTime object
if it is a SPA, I would have given to the client timestamp and there brought to the desired appearance using the same moment.js
norwood.Hermann62 answered on August 19th 19 at 23:47
I would create a getter and added this field to the serializer.