Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Extensions/Hashids.php
10264 views
1
<?php
2
3
namespace Pterodactyl\Extensions;
4
5
use Illuminate\Support\Arr;
6
use Hashids\Hashids as VendorHashids;
7
use Pterodactyl\Contracts\Extensions\HashidsInterface;
8
9
class Hashids extends VendorHashids implements HashidsInterface
10
{
11
public function decodeFirst(string $encoded, ?string $default = null): mixed
12
{
13
$result = $this->decode($encoded);
14
15
return Arr::first($result, null, $default);
16
}
17
}
18
19