I suggest that you take a look at the free Laravel from scratch course here at Laracasts. It will answer your questions .
Learning Laravel and MVC, need help wrapping my head around the architecture
I've got a site that manages competitive events. Over the years, it has grown to a pile of nearly unmanageable spaghetti and I'm considering rewriting it using laravel, but have some aspects of the MVC architecture I can't quite wrap my head around.
Part of the system involves judges entering a number of subscores for each entry. A final score is arrived at by dropping the highest and lowest score, then there's a system involving the subscores used for tiebreakers.
I can see there are 3 models in this scenario - judges, entries, and scores. The judges and entries are obvious, the scores model will have a relationship to one entry and one judge then columns for each subscore. What I'm not clear on is where does the logic to combine the individual scores for each entry into a final score. Would that code be part or the entry model? The controller? Some kind of total score model that combines the individual judges scores for an entry?
Please or to participate in this conversation.