【发布时间】:2012-12-14 22:45:21
【问题描述】:
我正在尝试将Orchestra platform 用于Laravel framework。
我已经为该平台安装了Authorize、Robotix、Melody Theme Manager 和Cello CMS 扩展。
我注意到 Authorize、Robotix 和 Cello CMS 扩展都列在 Resources 下,而 Melody Theme Manager 则列为 Extensions 旁边的顶级项目。
我想要的是通过 /orchestra/manages/pages 访问 Cello CMS 扩展,就像通过 /orchestra/manages/melody.themes 访问 Melody Theme Manager 一样。
我已经确定要添加顶部菜单项,我可以使用以下内容:
// Attach a menu only if user has the authorization to manage Pages
$acl = Orchestra\Acl::make('cello');
$menu = Orchestra::menu();
if ($acl->can('manage-pages')) {
$menu->add('Cello', 'after:themes')
->title('Pages')
->link(handles('orchestra::resources/cello'));
}
Event::listen('orchestra.started: backend', function()内部
这增加了一个工作链接,当然,问题是它仍然指向resources/cello,那么我怎样才能让它响应manages/pages呢?
【问题讨论】: