Welcome Guest, Not a member yet? Register   Sign In
How to avoid having BOTH __construct AND initController!?
#1

I'm used to __construct. Now, CI4 no longer use that BUT have 'replaced' it, it seems, with an initController method.

This is confusing, at best. And now I have to add this weird initController to get access to the request in my ResourceController ... it all has become weird somehow.

I want AAAAAALLLLLLLL my ResourceControllers to have access to the $request in the 'constructor' function (yes, otherwise it's bleedin' impossible to make anyting dynamic) ... HOW do I do that in a clear and clean way (preferably not having to have to use this weird initController thing, as it doesn't make any sense to me).

And can someone explain to me a case where a ResourceController would NOT need a $request?

Please, enlighten me, as there seems to be things I don't get about this CI4 thing. : )
Reply


Messages In This Thread
How to avoid having BOTH __construct AND initController!? - by blaasvaer - 12-17-2020, 09:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB