safeExecute(fn () => $this->service->handleStockChange($stock)); } public function updated(Stock $stock): void { $this->safeExecute(fn () => $this->service->handleStockChange($stock)); } public function deleted(Stock $stock): void { $this->safeExecute(fn () => $this->service->handleStockDeleted($stock)); } protected function safeExecute(callable $callback): void { try { $callback(); } catch (\Throwable $e) { Log::warning('TodayIssue StockObserver failed', [ 'error' => $e->getMessage(), ]); } } }