Welcome Guest, Not a member yet? Register   Sign In
Hooks on controller methods
#6

(This post was last modified: 10-13-2019, 01:45 AM by milengardev1994.)

The example that I give it was to briefly explain what is the issue that I am having.
Of course, there is more logic in the controller but I strip it to make it more clear, apparently not very successfully.

The '$id' indeed comes from HTTP request.

I was looking at something similar to the event system you mentioned. Your proposed solution for executing 'exist' in the constructor is valid and I already have used it when I am dealing with authentication. The only note I have with is that putting a lot of logic in the constructor for me seems a bit messy. Validating the request before actually reaching the controller seems a better option for me.
Reply


Messages In This Thread
Hooks on controller methods - by milengardev1994 - 10-11-2019, 02:06 PM
RE: Hooks on controller methods - by InsiteFX - 10-12-2019, 04:10 AM
RE: Hooks on controller methods - by InsiteFX - 10-12-2019, 11:33 AM
RE: Hooks on controller methods - by dave friend - 10-12-2019, 01:27 PM
RE: Hooks on controller methods - by milengardev1994 - 10-12-2019, 03:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB