Files
ABSDEV/Modules/Enterprise/Providers/EnterpriseServiceProvider.php
2026-07-24 14:59:44 +01:00

31 lines
1.1 KiB
PHP

<?php
namespace Modules\Enterprise\Providers;
use Illuminate\Support\ServiceProvider;
use Modules\Enterprise\Console\BackupCreateCommand;
use Modules\Enterprise\Console\BackupPruneCommand;
use Modules\Enterprise\Console\HealthCheckCommand;
use Modules\Enterprise\Services\BackupService;
use Modules\Enterprise\Services\SystemHealthService;
final class EnterpriseServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->register(RouteServiceProvider::class);
$this->mergeConfigFrom(module_path('Enterprise', 'Config/config.php'), 'enterprise');
$this->app->singleton(SystemHealthService::class);
$this->app->singleton(BackupService::class);
}
public function boot(): void
{
$this->loadMigrationsFrom(module_path('Enterprise', 'Database/Migrations'));
$this->loadViewsFrom(module_path('Enterprise', 'Resources/views'), 'enterprise');
if ($this->app->runningInConsole()) {
$this->commands([HealthCheckCommand::class, BackupCreateCommand::class, BackupPruneCommand::class]);
}
}
}