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\GoogleAuthMigrator;
|
|
|
|
use App\Services\Migrators\AegisMigrator;
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
public function register()
|
2022-10-07 18:58:48 +02:00
|
|
|
{
|
|
|
|
$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();
|
|
|
|
});
|
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()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|