Welcome Guest, Not a member yet? Register   Sign In
When to put code in Controller and when in Model
#2

(01-21-2023, 10:42 AM)Rinart Wrote:
  1. Photo upload and validation should be done in Controller and the Model should only handle final database interaction.
    What if I want to reuse photo validation and move in another controller? Where do I put it?

You can move the logic to:
- a library class
- parent controller class
- a trait
Reply


Messages In This Thread
RE: When to put code in Controller and when in Model - by kenjis - 01-21-2023, 07:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB