2FAuth/app/Providers/MigrationServiceProvider.php

51 lines
1.2 KiB
PHP
Raw Normal View History

<?php
namespace App\Providers;
use App\Factories\MigratorFactory;
use App\Factories\MigratorFactoryInterface;
use App\Services\Migrators\AegisMigrator;
2022-11-22 15:15:52 +01:00
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.
*
* @return void
*/
2023-08-01 11:26:58 +02:00
public function register() : void
{
$this->app->bind(MigratorFactoryInterface::class, MigratorFactory::class);
2022-11-22 15:15:52 +01:00
$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()
{
//
}
}