Files
2026-10-12 05:18:58 -04:00

20 lines
368 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Models\Traits;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Pterodactyl\Facades\Hashids;
trait HasHashid
{
/**
* @return Attribute<string, never>
*/
protected function hashid(): Attribute
{
return Attribute::get(fn (): string => Hashids::encode($this->getKey()));
}
}