【发布时间】:2014-01-19 03:02:57
【问题描述】:
我有属于Courses 的Lessons。我想要一个添加的课程重定向到该课程的课程索引而不是整个课程索引。
我已经在 add() 函数中尝试过这个:
return $this->redirect(array('controller' => 'courses', 'action' => 'view', $this->Lesson->Course->$id));
但是重定向不起作用。我怎样才能让它回到 http://www.example.com/courses/view/2
谢谢!
【问题讨论】:
标签: php cakephp http-redirect