Something that I didn't see in the example is that the service shouldn't hold anything related with the request and response. If we want to validate the request input, we can do it in a request class. If there is something wrong inside the service method, we should let the controller know so the right http code can be thrown.
That just flew under the radar mate. If you look at the code examples, you'll see that I've used a request classes myself. It's just that I'm so used to using request classes, I completely forgot to mention them in the article. I'll update the article ASAP. 😊
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is awesome, thanks for sharing.
Something that I didn't see in the example is that the service shouldn't hold anything related with the request and response. If we want to validate the request input, we can do it in a request class. If there is something wrong inside the service method, we should let the controller know so the right http code can be thrown.
That just flew under the radar mate. If you look at the code examples, you'll see that I've used a request classes myself. It's just that I'm so used to using request classes, I completely forgot to mention them in the article. I'll update the article ASAP. 😊