diff --git a/src/UniqueIdentifierGenerators/RandomIntGenerator.php b/src/UniqueIdentifierGenerators/RandomIntGenerator.php index 57c704cc..427dff1a 100644 --- a/src/UniqueIdentifierGenerators/RandomIntGenerator.php +++ b/src/UniqueIdentifierGenerators/RandomIntGenerator.php @@ -9,13 +9,14 @@ use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator; /** * Generates a cryptographically secure random integer for the tenant key. - * - * The integer is generated in range (0, PHP_INT_MAX). */ class RandomIntGenerator implements UniqueIdentifierGenerator { + public static int $min = 0; + public static int $max = PHP_INT_MAX; + public static function generate(Model $model): string|int { - return random_int(0, PHP_INT_MAX); + return random_int(static::$min, static::$max); } }