@vahidvs I don't think this is actually a problem. Having lots of Request classes is okay. If you are repeating yourself in some of them, just extract the shared code in a parent abstract class.
Dec 15, 2017
1
Level 1
best practice for generate laravel request validation in rest api app
i have a restful app with laravel 5.5 and i am using laravel request class for validating requests before use theme in my controllers. so now i have many request class because there is one class for each action. for example loginRequest.php for login action and RegisterRequest.php for register and .... I am wondering if it is ok to produce requests in this way! i have five request just for AuthController and much more requests for other controllers! I can't merge them because of individual rules belongs to each one. so what is the best practice to handle this volume of requests?
Please or to participate in this conversation.