waiyan93 / web-scraping

0 stars 0 forks source link

Extracting the CSV validation to a Form request class #8

Closed olivierobert closed 2 years ago

olivierobert commented 2 years ago

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 to LoginRequest. Laravel provides such abstraction out of the box 🌟

Expected

ResultController should only contain minimal business logic, thus be lean and not fat.