ModelViolationReporter
abstract class ModelViolationReporter
Traits
Constants
| private CONTEXT_REPORTED_PREFIX |
|
Methods
__construct(Closure|null $callback, bool $suppressDuplicateReports, bool $reportAfterResponse)
No description
array
bool
void
Details
in
ResolvesEventOrigin at line 15
protected Container
container()
Retrieve the application container.
in
ResolvesEventOrigin at line 20
protected array|null
resolveEventOrigin()
No description
in
ResolvesEventOrigin at line 44
protected string|null
resolveEventOriginAsString()
No description
at line 27
__construct(Closure|null $callback, bool $suppressDuplicateReports, bool $reportAfterResponse)
No description
at line 39
void
__invoke(Model $model, string|array $propertyOrProperties)
Handle a model violation.
at line 67
abstract protected array
getViolationContext(Model $model, string $property)
Get the context data for the violation.
at line 72
abstract protected Exception
getViolationException(Model $model, string $property)
Get the exception representing the violation.
at line 77
protected bool
shouldReport(Model $model, string $property)
Determine if the violation should be reported.
at line 92
protected void
markAsReported(Model $model, string $property)
Mark a violation as reported.