开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜