app->singleton(CacheKeyBuilder::class, function () { return new CacheKeyBuilder(version: 'v1'); }); $this->app->singleton(CacheInvalidator::class); $this->app->bind( PatientRepositoryInterface::class, PatientRepository::class ); } /** * Bootstrap any application services. */ public function boot(): void { ReportNurse::observe(ReportNurseObserver::class); ReportDuty::observe(ReportDutyObserver::class); DepartmentPatient::observe(DepartmentPatientObserver::class); // Подключение DBLIB для MSSQL Connection::resolverFor('dblib', function ($connection, $database, $prefix, $config) { // Создаём PDO через DBLIB $dsn = "dblib:host={$config['host']};dbname={$config['database']}"; $pdo = new \PDO($dsn, $config['username'], $config['password'], $config['options'] ?? []); return new Connection($pdo, $database, $prefix, $config); }); } }