laravel route validation in Request class code example
Example 1: laravel validate integer between
'item' => 'required|integer|between:1,10',
Example 2: laravel validation
Validator::extend('foo', 'FooValidator@validate');
'item' => 'required|integer|between:1,10',
Validator::extend('foo', 'FooValidator@validate');