search

Home  >  Q&A  >  body text

Can thinkphp5 (or laravel) execute two routing rules at the same time?

I need to execute closure routing first to check parameters, and then forward it to the corresponding controller. How can I achieve this requirement?

高洛峰高洛峰2787 days ago602

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-06-06 09:56:10

    Laravel has middleware for parameter checking. To write middleware, just add the middleware to the routing parameters.

    reply
    0
  • 黄舟

    黄舟2017-06-06 09:56:10

    You can execute the middleware settings, but be careful not to use the system admin for the two routes

    reply
    0
  • Cancelreply