vinkla / hashids

A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
https://hashids.org/php
MIT License
5.29k stars 417 forks source link

not working inside foreach #164

Closed diadal closed 3 years ago

diadal commented 3 years ago

encode Hashids::encode($v); not working inside foreach for worked outside laravel 8

diadal commented 3 years ago

i guess this is the issue

We've had several requests to add this feature — "it seems so easy to add". We will not add this feature for security purposes, doing so encourages people to encode sensitive data, like passwords. This is the wrong tool for that.

diadal commented 3 years ago

my string has - but is ok

vinkla commented 3 years ago

Please provide a failing test case in the HashidsTest test class in a pull request.