I would like to ask how to generate unique value from faker?
I know this is a familiar question actually, you may put some duplicate links e.g. link 1, link 2 but unfortunately, these links does not answer my problem.
Here is my code below. I tried unique(true)
but same result.
return [
'user_id' => $this->faker->unique()->numberBetween(1, 10),
//more code here
];
Below is the result that I got. As you can see there are lots of duplicate "5" inserted.