From eabe95a00c8886fc1613492c7a44a13fd1f81c84 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 23 Dec 2015 15:49:08 +0000 Subject: [PATCH] Don't make database query in validator --- app/Commands/Incident/ReportIncidentCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Commands/Incident/ReportIncidentCommand.php b/app/Commands/Incident/ReportIncidentCommand.php index 2d6dde33..2a98dcb8 100644 --- a/app/Commands/Incident/ReportIncidentCommand.php +++ b/app/Commands/Incident/ReportIncidentCommand.php @@ -93,7 +93,7 @@ final class ReportIncidentCommand 'status' => 'required|int|min:0|max:4', 'message' => 'string', 'visible' => 'bool', - 'component_id' => 'int|exists:components|required_with:component_status', + 'component_id' => 'int|required_with:component_status', 'component_status' => 'int|min:1|max:4|required_with:component_id', 'notify' => 'bool', 'incident_date' => 'string',