Laravel 13 upgrade, updates and fixes

This commit is contained in:
mchev
2026-03-21 18:53:33 +01:00
parent 48abd9020d
commit 186ab35fd4
34 changed files with 3849 additions and 2098 deletions

View File

@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
namespace App\Hashids;
use Hashids\Hashids as HashidsClient;
use Illuminate\Contracts\Container\Container;
use Illuminate\Support\ServiceProvider;
class HashidsServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->singleton('hashids.factory', function () {
return new HashidsFactory;
});
$this->app->alias('hashids.factory', HashidsFactory::class);
$this->app->singleton('hashids', function (Container $app) {
return new HashidsManager($app['config'], $app['hashids.factory']);
});
$this->app->alias('hashids', HashidsManager::class);
$this->app->bind('hashids.connection', function (Container $app) {
return $app['hashids']->connection();
});
$this->app->alias('hashids.connection', HashidsClient::class);
}
/**
* @return list<string>
*/
public function provides(): array
{
return [
'hashids',
'hashids.factory',
'hashids.connection',
];
}
}