Files

27 lines
729 B
PHP
Raw Permalink Normal View History

2017-09-09 23:55:21 -05:00
<?php
namespace Pterodactyl\Providers;
use Pterodactyl\Extensions\Hashids;
use Illuminate\Support\ServiceProvider;
use Pterodactyl\Contracts\Extensions\HashidsInterface;
class HashidsServiceProvider extends ServiceProvider
{
/**
* Register the ability to use Hashids.
*/
2023-02-23 12:30:16 -07:00
public function register(): void
2017-09-09 23:55:21 -05:00
{
$this->app->singleton(HashidsInterface::class, function () {
return new Hashids(
2022-11-25 15:29:04 -05:00
config('hashids.salt', ''),
config('hashids.length', 0),
config('hashids.alphabet', 'abcdefghijkmlnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
2017-09-09 23:55:21 -05:00
);
});
$this->app->alias(HashidsInterface::class, 'hashids');
}
}