GET in uri routing |
Well I have something maybe its interest. I have url structure like this https://my.example.com/console?pages=dashboard
And I have a lot of get value, not just dashboard . I want to describe in routes, can I? I mean can I set in routes with my url structure like that?? Because I don't want describe in one controller (this is what I do right now). Thanks
@mjamilasfihani,
Have you looked at the documentation? https://codeigniter.com/user_guide/incom...uting.html I would think that you should have no problem creating a url structure of your own choosing.
(04-04-2020, 12:32 PM)php_rocs Wrote: @mjamilasfihani, Sorry its not about $routes->get(); here I give more description what I mean : console?pages=dashboard console?pages=profile ... ... I want set them in every script but in routes.php not in my controller (if I set in my controller I must check every get value that must be same with available option, but if in routes.php it will throw 404. I want do that) , can you get what I mean? Thanks
in routes.php
die(var_dump(service('request')->getGet('dashboard'))); // profile,... |
Welcome Guest, Not a member yet? Register Sign In |