2020-04-26 16:07:36 -07:00
|
|
|
<?php
|
|
|
|
|
|
2024-03-12 22:39:16 -04:00
|
|
|
namespace App\Providers;
|
2020-04-26 16:07:36 -07:00
|
|
|
|
2024-03-12 22:39:16 -04:00
|
|
|
use App\Extensions\Backups\BackupManager;
|
2020-04-26 16:07:36 -07:00
|
|
|
use Illuminate\Contracts\Support\DeferrableProvider;
|
2025-09-24 13:34:19 +02:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2020-04-26 16:07:36 -07:00
|
|
|
|
|
|
|
|
class BackupsServiceProvider extends ServiceProvider implements DeferrableProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register the S3 backup disk.
|
|
|
|
|
*/
|
2023-02-23 12:30:16 -07:00
|
|
|
public function register(): void
|
2020-04-26 16:07:36 -07:00
|
|
|
{
|
|
|
|
|
$this->app->singleton(BackupManager::class, function ($app) {
|
|
|
|
|
return new BackupManager($app);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-03 14:41:19 -05:00
|
|
|
/**
|
|
|
|
|
* @return class-string[]
|
|
|
|
|
*/
|
2022-10-14 10:59:20 -06:00
|
|
|
public function provides(): array
|
2020-04-26 16:07:36 -07:00
|
|
|
{
|
|
|
|
|
return [BackupManager::class];
|
|
|
|
|
}
|
|
|
|
|
}
|