mirror of
https://github.com/pterodactyl/panel.git
synced 2026-04-12 06:03:42 -05:00
18 lines
421 B
PHP
18 lines
421 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Extensions;
|
|
|
|
use Illuminate\Support\Arr;
|
|
use Hashids\Hashids as VendorHashids;
|
|
use Pterodactyl\Contracts\Extensions\HashidsInterface;
|
|
|
|
class Hashids extends VendorHashids implements HashidsInterface
|
|
{
|
|
public function decodeFirst(string $encoded, ?string $default = null): mixed
|
|
{
|
|
$result = $this->decode($encoded);
|
|
|
|
return Arr::first($result, null, $default);
|
|
}
|
|
}
|