Search by ID when using UUID or ULID #2373
Closed
gabrielgasp
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
There is a V6 new feature, but it still has not been released Maybe you could test it |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when performing operations such as
assignRole
,removeRole
,givePermissionTo
, etc., the default behavior is to search for roles and permissions using either their numeric ID or their name if the argument provided is a string. However, this can pose a problem if you're using UUIDs or ULIDs as primary keys, since they are also strings but should still be treated as IDs.To address this issue, I suggest implementing a check using the
Str::isUuid
andStr::isUlid
methods before searching by name. This will ensure that UUIDs and ULIDs are properly recognized as IDs and searched for accordingly.While this issue may not affect most users, would be nice to address it to ensure the consistency of the package's behavior.
Beta Was this translation helpful? Give feedback.
All reactions