oop - Models getting out of hand -


we use laravel in our company , follow 2 simple conventions:

  1. controllers should thin.
  2. models represents database entities (user, roles, cars)

now we're facing dilemma: have screen complicated data graphs represented require long , heavy logic produce. should put of logic? controllers should thin - not in controllers. models represent data entities, can't model since screen displays data of other models don't have actual table/database entity. services doesn't sound normal place.

i wondering how did approach similar situations

i put logic service. in service can run other services (in case logic in other service or if service complicated) , use repositories (or models in case don't use repositories). of course there no point put big code or logic controllers because run services return desired output.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -