Works for signed and unsigned integers of type: TinyInt, SmallInt, Int, BigInt.
You just require using composer and you're good to go!
composer require rackbeat/laravel-validate-mysql-integersThe Service Provider is automatically registered.
Rackbeat\Rules\TinyIntegerRackbeat\Rules\SmallIntegerRackbeat\Rules\IntegerRackbeat\Rules\BigInteger
'number' => [
new Rackbeat\Rules\BigInteger($unsigned = true),
],The helpers are prefixed with "real_" to prevent overlapping.
It can take an optional parameter to determine if its unsigned. Defaults to false.
real_tiny_intreal_small_intreal_intreal_big_int
'id' => ['real_tiny_int:1'], // unsigned
'number' => ['real_tiny_int:0'], // signed- PHP >= 7.1