diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-09 22:30:23 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-09 22:30:23 -0400 |
commit | 1176a489ab6f3dbe46bc5acea1afca9ecd6de448 (patch) | |
tree | 0de6218fd721685b6cb3ec07302d053daf58ca97 /app/Model | |
parent | 5d5ba443370df91d59812db5691fa846a9854837 (diff) |
Allow auto-completion with the task id
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/TaskFilter.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php index 31de2795..94f6bab0 100644 --- a/app/Model/TaskFilter.php +++ b/app/Model/TaskFilter.php @@ -24,6 +24,15 @@ class TaskFilter extends Base return $this; } + public function filterById($task_id) + { + if ($task_id > 0) { + $this->query->eq('id', $task_id); + } + + return $this; + } + public function filterByTitle($title) { $this->query->ilike('title', '%'.$title.'%'); |