2FAuth/app/Providers/MigrationServiceProvider.php
2023-12-20 16:55:58 +01:00

49 lines
1.2 KiB
PHP

<?php
namespace App\Providers;
use App\Factories\MigratorFactory;
use App\Factories\MigratorFactoryInterface;
use App\Services\Migrators\AegisMigrator;
use App\Services\Migrators\GoogleAuthMigrator;
use App\Services\Migrators\PlainTextMigrator;
use App\Services\Migrators\TwoFASMigrator;
use Illuminate\Support\ServiceProvider;
class MigrationServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register() : void
{
$this->app->bind(MigratorFactoryInterface::class, MigratorFactory::class);
$this->app->singleton(GoogleAuthMigrator::class, function () {
return new GoogleAuthMigrator();
});
$this->app->singleton(AegisMigrator::class, function () {
return new AegisMigrator();
});
$this->app->singleton(TwoFASMigrator::class, function () {
return new TwoFASMigrator();
});
$this->app->singleton(PlainTextMigrator::class, function () {
return new PlainTextMigrator();
});
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
//
}
}