This is for form requests. Have a look at the documentation from the top section
https://laravel.com/docs/5.7/validation#form-request-validation
Theres also a good laracasts tutorial (5.4 but still valid- recommend whole series)
https://laracasts.com/series/laravel-from-scratch-2017/episodes/28