1 year ago

best practice for generate laravel request validation in rest api app

Posted 1 year ago by vahidvs

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 sign in or create an account to participate in this conversation.