• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hooks on controller methods

#6
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.