From 544f9924241f9b2caaf83ead203161ea41e5f1cf Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 5 Mar 2014 22:27:48 -0500 Subject: Add a 'due date' field and display the number of comments on the board --- models/comment.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'models/comment.php') diff --git a/models/comment.php b/models/comment.php index e0944249..9e5cf8fd 100644 --- a/models/comment.php +++ b/models/comment.php @@ -25,6 +25,14 @@ class Comment extends Base ->findAll(); } + public function count($task_id) + { + return $this->db + ->table(self::TABLE) + ->eq(self::TABLE.'.task_id', $task_id) + ->count(); + } + public function create(array $values) { $values['date'] = time(); -- cgit v1.2.3