2FAuth/app/Providers/MigrationServiceProvider.php
2024-09-26 23:50:01 +02:00

49 lines
1.1 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()
{
//
}
}