radfusion/app/helpers.php
2024-12-30 20:11:07 +06:00

16 lines
281 B
PHP

<?php
if (! function_exists('hash_it')) {
function hash_it(int $key): string
{
return Hashids::encode($key);
}
}
if (! function_exists('unhash_it')) {
function unhash_it(string $hashid): int
{
return (int) Hashids::decode($hashid)[0];
}
}