2017-09-10 04:55:21 +00: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.
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
$this->app->singleton(HashidsInterface::class, function () {
|
|
|
|
return new Hashids(
|
2022-11-25 20:29:04 +00:00
|
|
|
config('hashids.salt', ''),
|
|
|
|
config('hashids.length', 0),
|
|
|
|
config('hashids.alphabet', 'abcdefghijkmlnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
|
2017-09-10 04:55:21 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->alias(HashidsInterface::class, 'hashids');
|
|
|
|
}
|
|
|
|
}
|