Closed jcherrabi closed 4 years ago
You should be able to just set a valid UUID as a string, and the package will handle casting it properly if it's already set.
I've added some extra handling and some tests around this, but essentially what you're after is:
factory(App\User::class)->create([
'id' => 1,
'name' => 'Admin',
'uuid' => $this->faker->uuid,
]);
The EfficientUuid
cast will handle the rest for you.
Hello there, it is unclear to me on how to generate a new uuid for my test unit, can you please share an example?
gives an error??? thank you .