0
我有Lessons
屬於Courses
。我想要一個額外的教訓來重定向到該課程的課程索引,而不是整個課程索引。在子控制器中獲取父變量
我在add()
功能試過這樣:
return $this->redirect(array('controller' => 'courses', 'action' => 'view', $this->Lesson->Course->$id));
但重定向不能正常工作。我該如何使它回到 http://www.example.com/courses/view/2
謝謝!