0

我正在尝试为 1 个实体创建 2 个管理页面,但模式是相同的:

php 应用程序/控制台路由:调试

dis_codes_companies_list              ANY      /admin/mobispot/discodes/discode/list
dis_codes_companies_create            ANY      /admin/mobispot/discodes/discode/create
dis_codes_companies_batch             ANY      /admin/mobispot/discodes/discode/batch
dis_codes_companies_edit              ANY      /admin/mobispot/discodes/discode/{id}/edit
dis_codes_companies_delete            ANY      /admin/mobispot/discodes/discode/{id}/delete
dis_codes_companies_show              ANY      /admin/mobispot/discodes/discode/{id}/show
dis_codes_companies_export            ANY      /admin/mobispot/discodes/discode/export
dis_codes_companies_set_premium       ANY      /admin/mobispot/discodes/discode/{id}/setpremium
dis_codes_personal_list               ANY      /admin/mobispot/discodes/discode/list
dis_codes_personal_create             ANY      /admin/mobispot/discodes/discode/create
dis_codes_personal_batch              ANY      /admin/mobispot/discodes/discode/batch
dis_codes_personal_edit               ANY      /admin/mobispot/discodes/discode/{id}/edit
dis_codes_personal_delete             ANY      /admin/mobispot/discodes/discode/{id}/delete
dis_codes_personal_show               ANY      /admin/mobispot/discodes/discode/{id}/show
dis_codes_personal_export             ANY      /admin/mobispot/discodes/discode/export
dis_codes_personal_set_premium        ANY      /admin/mobispot/discodes/discode/{id}/setpremium

我可以在哪里更改路线模式?如果我在 RouteCollection 类中执行此操作,则会出现错误:

No route found for "GET /admin/mobispot/discodes/personal/list"
4

1 回答 1

0

您可以在 configureRoutes 方法中更改 AdminClass 中的路由

protected function configureRoutes(RouteCollection $router) {
    $router->add('copy', $this->getRouterIdParameter() . '/copy');
    $router->add('getSubProjects', $this->getRouterIdParameter() . '/getSubProjects');
}
于 2012-06-20T08:52:54.110 回答