2022-09-30 13:56:11 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2022-10-07 18:58:48 +02:00
|
|
|
use App\Factories\MigratorFactory;
|
|
|
|
use App\Factories\MigratorFactoryInterface;
|
2022-09-30 13:56:11 +02:00
|
|
|
use App\Services\Migrators\AegisMigrator;
|
2022-11-22 15:15:52 +01:00
|
|
|
use App\Services\Migrators\GoogleAuthMigrator;
|
2022-09-30 13:56:11 +02:00
|
|
|
use App\Services\Migrators\PlainTextMigrator;
|
2022-10-11 11:20:07 +02:00
|
|
|
use App\Services\Migrators\TwoFASMigrator;
|
2022-09-30 13:56:11 +02:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
2022-10-07 18:58:48 +02:00
|
|
|
class MigrationServiceProvider extends ServiceProvider
|
2022-09-30 13:56:11 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-08-01 11:26:58 +02:00
|
|
|
public function register() : void
|
2022-10-07 18:58:48 +02:00
|
|
|
{
|
|
|
|
$this->app->bind(MigratorFactoryInterface::class, MigratorFactory::class);
|
2022-11-22 15:15:52 +01:00
|
|
|
|
2022-10-07 18:58:48 +02:00
|
|
|
$this->app->singleton(GoogleAuthMigrator::class, function () {
|
|
|
|
return new GoogleAuthMigrator();
|
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->singleton(AegisMigrator::class, function () {
|
|
|
|
return new AegisMigrator();
|
|
|
|
});
|
2022-09-30 13:56:11 +02:00
|
|
|
|
2022-10-11 11:20:07 +02:00
|
|
|
$this->app->singleton(TwoFASMigrator::class, function () {
|
|
|
|
return new TwoFASMigrator();
|
|
|
|
});
|
|
|
|
|
2022-10-07 18:58:48 +02:00
|
|
|
$this->app->singleton(PlainTextMigrator::class, function () {
|
|
|
|
return new PlainTextMigrator();
|
|
|
|
});
|
2022-09-30 13:56:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|