fix the command

This commit is contained in:
2026-06-14 10:05:13 +03:30
parent e7ced6267d
commit 0b7b22ff87
5 changed files with 42 additions and 2 deletions

View File

@@ -29,4 +29,18 @@ class UpdateRequest extends FormRequest
'enter_station' => 'required|date',
];
}
public function after(): array
{
return [
function (Validator $validator) {
if (strtotime($this->violation->exit_station) < strtotime($this->enter_station)) {
$validator->errors()->add(
'time',
'زمان پایان ماموریت باید بعد از زمان شروع ماموریت باشد.'
);
}
}
];
}
}