Auto update sluggable field with Doctrine
I'm usin开发者_运维百科g CodeIgniter with Doctrine in a project. One of my models has the Sluggable behavior. The slug is created according to another field X when the object is saved. I was wondering if there was a way to automatically update this slug field when the X field is updated.
At the moment, if I update the X field, the slug field remains with the sluggable format of the old X field value.
Thanks in advance.
You can define "canUpdate" => true. So the slug gets updated every time you change the X field
精彩评论