Level 10
Ended up using normal php $random = rand(1,115))...
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I am not able to find out how to generate a random number with a range using faker: 'town_id' => $faker->numberBetween($min = 1, $max = 115),
Does anyone knows the equivalent please? I would have thought that the above function would have worked based on this link: https://packagist.org/packages/fzaninotto/faker
numberBetween($min = 1000, $max = 9000) // 8567 <-----------
Thank you.
Please or to participate in this conversation.