How do I display the record count of a related model with CakePHP?

Posted by Josh Brown on Stack Overflow See other posts from Stack Overflow or by Josh Brown
Published on 2010-04-29T00:01:12Z Indexed on 2010/04/29 0:07 UTC
Read the original article Hit count: 161

Filed under:
|

I have two models. Lets say they are "Posts" and "Comments". In an admin view for Posts, I want to display how many comments are on that post. I am confused on where to put the code. In the controller or the view? I would like it to be in the controller.

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about count