24 lines
540 B
PHP
24 lines
540 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\AdminAuthService;
|
|
use Illuminate\Contracts\Auth\StatefulGuard;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(
|
|
AdminAuthService::class,
|
|
function () {
|
|
$guard = Auth::guard('backend');
|
|
return new AdminAuthService($guard);
|
|
}
|
|
);
|
|
}
|
|
}
|