简体   繁体   English

Symfony添加其他Route参数

[英]Symfony adding additional Route parameters

I am trying to add new parameters to the route. 我正在尝试向路由添加新参数。

Example Route: config/routes.yaml 路由示例:config / routes.yaml

admin_account_list:
    path:       /accounts
    controller: App\Admin\Controller\Account\AccountController::list
    methods: [GET, POST]
    newParam: // I want to add this

Is there a way to determine the class to be run whenever this route is used 有没有一种方法可以确定每当使用此路由时要运行的类

admin_account_list:
path:       /accounts
controller: App\Admin\Controller\Account\AccountController::list
methods: [GET, POST]
defaults:
    page: 1
    title: "Hello world!"

try this it may help you 试试这个可能对你有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM