From 1176a489ab6f3dbe46bc5acea1afca9ecd6de448 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 9 May 2015 22:30:23 -0400 Subject: Allow auto-completion with the task id --- app/Model/TaskFilter.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/Model') 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.'%'); -- cgit v1.2.3