Files

18 lines
421 B
PHP
Raw Permalink Normal View History

2017-09-09 23:55:21 -05:00
<?php
namespace Pterodactyl\Extensions;
use Illuminate\Support\Arr;
2017-09-09 23:55:21 -05:00
use Hashids\Hashids as VendorHashids;
use Pterodactyl\Contracts\Extensions\HashidsInterface;
class Hashids extends VendorHashids implements HashidsInterface
{
2024-10-21 19:18:20 -06:00
public function decodeFirst(string $encoded, ?string $default = null): mixed
2017-09-09 23:55:21 -05:00
{
$result = $this->decode($encoded);
return Arr::first($result, null, $default);
2017-09-09 23:55:21 -05:00
}
}