ResultController contains a lot of logic, hence has too many responsibilities and is hard to test. That logic should be extracted. For instance, the CSV file validation and processing could be extracted to a request class similar to LoginRequest. Laravel provides such abstraction out of the box 🌟
Expected
ResultController should only contain minimal business logic, thus be lean and not fat.
Issue
ResultController
contains a lot of logic, hence has too many responsibilities and is hard to test. That logic should be extracted. For instance, the CSV file validation and processing could be extracted to a request class similar toLoginRequest
. Laravel provides such abstraction out of the box 🌟Expected
ResultController
should only contain minimal business logic, thus be lean and not fat.