php - How to know which route was selected? -
- I have created a function in bootstrap to make routing.
- Once the route has been selected, I would like to know which one it is. Ideally I would like to be able to get that information even in bootstrap, assume that I have a first function
. _initRouting ()
which decides the routing and later a second function in the bootstrap_whichRoute () <
- Once the route has been selected, I would like to know which one it is. Ideally I would like to be able to get that information even in bootstrap, assume that I have a first function
docs:
If you need to determine which route was matched, then You get to the getCurrentRouteName () method Can yoga, which will return the identifier used when registering the route with the router. If you want the actual route object, you can use getCurrentRoute ().
Then you must get the requested object in your bootstrap and use the above or use the control plugin
Comments
Post a Comment