Web App Developer
Sometimes a good product isn’t one that has been designed meticulously, but one that has a good story behind it.
Writing validation logic in the controller will break The Single Responsibility Principle. We all know that requirements changes over time and every time requirement get change your class re…
…’s not the best way to do this and your controller looks messy. This is bad practice in my opinion. The controller should do only one thing handle request from the route and return an appropriate response.