AutoRoutingImproved feature |
I just wrote about an issue I am facing in stackoverflow and then remembered this forum.
AutoRoutingImproved feature Pasting it here for reference. Newbie to CodeIgniter (4.4) here; I am trying to use autoroutingimproved feature of codeigniter documented here It mentions that it will not route to home/Foo as home is default route. Ok, then how do I get it to route to Foo() method? It goes on to say to delete Foo() method. In that sense the Home controller isn't expected to have any other methods? I tried setting up method getFoo(): string and expecting to route via http://mysite/Foo It gives me error: Cannot access the default controller "\App\Controllers\Home::getFoo" Note: have used c# routing in the past. Any ideas? Please help.
The basic pattern is "controller/method".
If you want http://mysite/foo, create app/Controllers/Foo.php and define the getIndex() method in it.
What do you really want to do?
I recommend you create Foo controller for http://mysite/foo
(08-28-2023, 06:39 PM)kenjis Wrote: What do you really want to do? Never mind, I already went ahead with that approach. thanks |
Welcome Guest, Not a member yet? Register Sign In |