mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-12 17:28:13 +01:00
52 lines
985 B
PHP
52 lines
985 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\LogoService;
|
|
use App\Services\QrCodeService;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Contracts\Support\DeferrableProvider;
|
|
|
|
class TwoFAuthServiceProvider extends ServiceProvider implements DeferrableProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton(LogoService::class, function ($app) {
|
|
return new LogoService();
|
|
});
|
|
|
|
$this->app->singleton(QrCodeService::class, function ($app) {
|
|
return new QrCodeService();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
|
|
|
|
/**
|
|
* Get the services provided by the provider.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function provides()
|
|
{
|
|
return [
|
|
LogoService::class,
|
|
QrCodeService::class,
|
|
];
|
|
}
|
|
}
|