@extends('layouts.master') @section('title', 'Geofencing Management - Udankhatola') @section('content')

Location Geofencing Management

@if(session('success')) @endif @if(session('error')) @endif
Configure Geofencing for Locations
How to use:
  • Add Latitude and Longitude for each location
  • Set Geofence Radius in meters (e.g., 1000m = 1km)
  • Group locations by Region (e.g., "Haridwar" for CHD + MNS)
  • Agents will be validated against all locations in their region

Tip: Get coordinates from Google Maps - Right-click on location → Click coordinates to copy
@forelse($locations as $location) @csrf @method('PATCH') @empty @endforelse
Location Name Loccode Latitude Longitude Geofence Radius (meters) Region Status Action
{{ $location->name }} {{ $location->loccode }} @error('latitude') {{ $message }} @enderror @error('longitude') {{ $message }} @enderror {{ $location->geofence_radius ? round($location->geofence_radius/1000, 2) . ' km' : '' }} @error('geofence_radius') {{ $message }} @enderror @error('region') {{ $message }} @enderror @if($location->latitude && $location->longitude) Configured @else Pending @endif @if($location->latitude && $location->longitude) @endif

No locations found

Bulk Region Assignment
@csrf
@foreach($locations as $location)
@endforeach
Check multiple locations to assign them to the same region
All selected locations will be grouped under this region
Example: Select "Chandi Devi (CHD)" and "Mansa Devi (MNS)" and enter region as "Haridwar" to group them together.
Quick Reference
Geofence Radius Examples:
  • 100m - Very tight (within building)
  • 500m - Nearby area (5-10 min walk)
  • 1000m (1km) - Local area (recommended)
  • 5000m (5km) - Wider area
  • 10000m (10km) - City-wide
Region Grouping:
  • Same Region: Agent validated against ALL locations in region
  • Example: CHD + MNS both in "Haridwar" region
  • Benefit: Agent can book from either location if within range
  • No Region: Only validated against assigned location
@endsection