feat(events): add exact_location field to events and update related logic

This commit is contained in:
2026-09-18 14:48:25 -03:00
parent 801d25b218
commit dc5134a6ec
7 changed files with 32 additions and 3 deletions

View File

@@ -19,6 +19,9 @@ class UpdateEventRequest extends FormRequest
return [
'title' => ['required', 'string', 'max:255'],
'location' => ['required', 'string', 'max:255'],
'exact_location' => ['sometimes', 'nullable', 'array:latitude,longitude'],
'exact_location.latitude' => ['required_with:exact_location', 'numeric', 'between:-90,90'],
'exact_location.longitude' => ['required_with:exact_location', 'numeric', 'between:-180,180'],
'attachment_id' => ['sometimes', 'nullable', 'integer', Rule::exists('attachments', 'id')->where('type', 'image')],
'social_media' => ['sometimes', 'array'],
'social_media.*' => ['required', 'array:code,url,orden'],