Answer the question
In order to leave comments, you need to log in
Is it possible to store calculation logic in Model?
For example, there is some kind of geometric figure described in the model.
Let it be a triangle.
He has 3 lines.
Is it correct to create a getter that calculates the perimeter?
Or is it better to still calculate the perimeter and area in the controller?
Answer the question
In order to leave comments, you need to log in
You can make some small parameters in getters. And so the business logic should be at least in services.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question