laravel-hashid icon indicating copy to clipboard operation
laravel-hashid copied to clipboard

Error using HashId with String Primary Key

Open pamungkasandono opened this issue 1 year ago • 1 comments

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!

pamungkasandono avatar Oct 10 '24 01:10 pamungkasandono