2FAuth/app/Providers/TwoFAuthServiceProvider.php

64 lines
1.4 KiB
PHP
Raw Normal View History

2022-07-19 17:27:23 +02:00
<?php
namespace App\Providers;
2022-11-22 15:15:52 +01:00
use App\Factories\MigratorFactoryInterface;
2022-07-19 17:27:23 +02:00
use App\Services\LogoService;
2022-09-21 21:50:41 +02:00
use App\Services\ReleaseRadarService;
2022-11-22 15:15:52 +01:00
use App\Services\SettingService;
use App\Services\TwoFAccountService;
2022-07-19 17:27:23 +02:00
use Illuminate\Contracts\Support\DeferrableProvider;
2022-11-22 15:15:52 +01:00
use Illuminate\Support\ServiceProvider;
2022-07-19 17:27:23 +02:00
class TwoFAuthServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
$this->app->singleton(TwoFAccountService::class, function ($app) {
return new TwoFAccountService($app->make(MigratorFactoryInterface::class));
});
$this->app->singleton(SettingService::class, function () {
return new SettingService();
});
$this->app->singleton(LogoService::class, function () {
2022-07-19 17:27:23 +02:00
return new LogoService();
});
2022-09-21 21:50:41 +02:00
$this->app->singleton(ReleaseRadarService::class, function () {
return new ReleaseRadarService();
});
2022-07-19 17:27:23 +02:00
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
//
2022-11-22 15:15:52 +01:00
}
2022-07-19 17:27:23 +02:00
/**
* Get the services provided by the provider.
*
2022-12-09 10:52:17 +01:00
* @codeCoverageIgnore
2022-12-13 12:07:29 +01:00
*
2022-07-19 17:27:23 +02:00
* @return array
*/
public function provides()
{
return [
LogoService::class,
ReleaseRadarService::class,
];
2022-07-19 17:27:23 +02:00
}
}