diff --git a/src/Sentry/Laravel/Integration/ModelViolations/ModelViolationReporter.php b/src/Sentry/Laravel/Integration/ModelViolations/ModelViolationReporter.php index f2b3f4da..952920ed 100644 --- a/src/Sentry/Laravel/Integration/ModelViolations/ModelViolationReporter.php +++ b/src/Sentry/Laravel/Integration/ModelViolations/ModelViolationReporter.php @@ -35,8 +35,13 @@ public function __construct(?callable $callback, bool $suppressDuplicateReports, $this->reportAfterResponse = $reportAfterResponse; } - public function __invoke(Model $model, string $property): void + /** @param string|array $propertyOrProperties */ + public function __invoke(Model $model, $propertyOrProperties): void { + $property = is_array($propertyOrProperties) + ? implode(', ', $propertyOrProperties) + : $propertyOrProperties; + if (!$this->shouldReport($model, $property)) { return; }