diff options
Diffstat (limited to 'app/Model/Category.php')
| -rw-r--r-- | app/Model/Category.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Model/Category.php b/app/Model/Category.php index 58eba403..f86abe58 100644 --- a/app/Model/Category.php +++ b/app/Model/Category.php @@ -62,6 +62,21 @@ class Category extends Base } /** + * Return all categories for a given project + * + * @access public + * @param integer $project_id Project id + * @return array + */ + public function getAll($project_id) + { + return $this->db->table(self::TABLE) + ->eq('project_id', $project_id) + ->asc('name') + ->findAll(); + } + + /** * Create a category * * @access public |
