how get route name from current url? |
Try \CodeIgniter\Config\Services::router()->getMatchedRouteOptions()['as'] ?
Simple CI 4 project for beginners codeigniter-expenses
The method is not documented.
https://codeigniter4.github.io/CodeIgnit...uting.html It may be changed in the future. So I recommend you create a function or method to call above code. Then, even if the method is changed, you will need to update only the function/method code. |
Welcome Guest, Not a member yet? Register Sign In |