Skip to content

Error using HashId with String Primary Key #138

@pamungkasandono

Description

@pamungkasandono

Hello,

I hope you can help me. I'm encountering the following error when using the library:

TypeError: Veelasky\LaravelHashId\Repository::idToHash(): Argument #1 ($idKey) must be of type int, string given, called in vendor\veelasky\laravel-hashid\src\Eloquent\HashableId.php on line 77.

I'm trying to use HashId with a primary key that is a string. Could you please advise on how to properly implement HashId in this scenario?

Thank you for your assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions