16 lines
271 B
PHP
16 lines
271 B
PHP
<?php
|
|
|
|
if (! function_exists('_h')) {
|
|
function _h(int $key): string
|
|
{
|
|
return Hashids::encode($key);
|
|
}
|
|
}
|
|
|
|
if (! function_exists('unhash_it')) {
|
|
function unhash_it(string $hashid): int
|
|
{
|
|
return (int) Hashids::decode($hashid)[0];
|
|
}
|
|
}
|