From bc98748c0d5b1e1c4d08f16b58db8aea9b5fb5ce Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 12 Jul 2015 10:38:42 -0400 Subject: Start to implement url rewrite (nice urls) --- app/Api/Project.php | 6 +++--- app/Api/Task.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Api') diff --git a/app/Api/Project.php b/app/Api/Project.php index faf2a3da..4e4e10b8 100644 --- a/app/Api/Project.php +++ b/app/Api/Project.php @@ -87,9 +87,9 @@ class Project extends Base { if (! empty($project)) { $project['url'] = array( - 'board' => $this->helper->url->base().$this->helper->url->to('board', 'show', array('project_id' => $project['id'])), - 'calendar' => $this->helper->url->base().$this->helper->url->to('calendar', 'show', array('project_id' => $project['id'])), - 'list' => $this->helper->url->base().$this->helper->url->to('listing', 'show', array('project_id' => $project['id'])), + 'board' => $this->helper->url->to('board', 'show', array('project_id' => $project['id']), '', true), + 'calendar' => $this->helper->url->to('calendar', 'show', array('project_id' => $project['id']), '', true), + 'list' => $this->helper->url->to('listing', 'show', array('project_id' => $project['id']), '', true), ); } diff --git a/app/Api/Task.php b/app/Api/Task.php index ade49a6d..3b8c1ec8 100644 --- a/app/Api/Task.php +++ b/app/Api/Task.php @@ -119,7 +119,7 @@ class Task extends Base private function formatTask($task) { if (! empty($task)) { - $task['url'] = $this->helper->url->base().$this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])); + $task['url'] = $this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), '', true); } return $task; -- cgit v1.2.3