Welcome Guest, Not a member yet? Register   Sign In
GET in uri routing
#1

(This post was last modified: 04-04-2020, 12:16 PM by mjamilasfihani.)

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 Big Grin . 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
Reply
#2

@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.
Reply
#3

(This post was last modified: 04-04-2020, 12:41 PM by mjamilasfihani.)

(04-04-2020, 12:32 PM)php_rocs Wrote: @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.

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
Reply
#4

(This post was last modified: 04-05-2020, 01:18 PM by cukikt0302.)

in routes.php
die(var_dump(service('request')->getGet('dashboard'))); // profile,...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB