validate([ 'lat' => ['required', 'numeric', 'between:-90,90'], 'lng' => ['required', 'numeric', 'between:-180,180'], 'radius_km' => ['nullable', 'numeric', 'min:0.1', 'max:50'], 'limit' => ['nullable', 'integer', 'min:1', 'max:50'], ]); $stores = $finder->nearby( (float) $data['lat'], (float) $data['lng'], (float) ($data['radius_km'] ?? 5.0), (int) ($data['limit'] ?? 25), ); return $this->ok(PublicPartnerStoreResource::collection($stores)); } public function show(PartnerStore $store): JsonResponse { if ($store->status !== PartnerStore::STATUS_ACTIVE) { return $this->fail('Store not available', null, 404); } $store->load(['barangay', 'inventory']); return $this->ok(new PublicPartnerStoreResource($store)); } }