radfusion/app/helpers.php
2024-12-30 22:13:25 +06:00

25 lines
445 B
PHP

<?php
use App\Services\AuditTrail\ActivityLogger;
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];
}
}
if (! function_exists('audit')) {
function audit(): ActivityLogger
{
return app(ActivityLogger::class);
}
}