Closed nathan-io closed 4 years ago
Update: It appears to be working fine without any cast.
After adding GeneratesUuid
to our User
model, I created a new user. It has a valid UUID.
In the Nova admin panel, I can see the UUID displayed as a string. And I'm able to retrieve the new record with User::whereUuid()
in Tinker.
So everything seems to be working nicely out of the box on Laravel 7 with Postgres 12, without casting and using Laravel's standard uuid
method in the migration.
Thank you for this great package!
We're using PostgreSQL, which has a
uuid
data type that stores the value as bytes.We've manually prepared a migration which includes a
uuid
field in our model:After running the migration on our Postgres database, our
uuid
column data type isuuid
as desired.My question is, do we still need to cast our
uuid
field? If so, can we simply copy the custom cast frommichaeldyrynda/laravel-efficient-uuid
?