-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casting id to string when uuid = true #76
Comments
Please provide more context, thanks. |
$version = Version::where('id', '9c67bec3-e795-4555-b130-98468e3034db')->first();
dd($version->id); // output: 9 When I cast id to string or set variable public $incrementing = false (only when 'uuid' => true) $version = Version::where('id', '9c67bec3-e795-4555-b130-98468e3034db')->first();
dd($version->id); // output: "9c67bec3-e795-4555-b130-98468e3034db" |
@robsonek You can try this: public function getIncrementing()
{
return !\config('versionable.uuid');
} |
OK thanks. Works correctly! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have uuid = true and when I get data from the model 'id' is cast to int. Adding it to Version.php solves the problem
The text was updated successfully, but these errors were encountered: