开发者

Should this be a view helper or action helper

开发者 https://www.devze.com 2023-02-06 19:43 出处:网络
I have an architec开发者_开发技巧tural question, no code. I\'m trying to output time in the format 8 days ago, 7 days ago, etc. Should I process the original time in the action with an action helper o

I have an architec开发者_开发技巧tural question, no code. I'm trying to output time in the format 8 days ago, 7 days ago, etc. Should I process the original time in the action with an action helper or should I process it in the view with a view helper?


I would do it in a view helper. This would allow to use it in many views, and it would be easy to modify the format if needed.

0

精彩评论

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