How mahmudur26/geo-location-fetcher works
This is a Laravel geolocation capture and display app. A visitor’s browser obtains coordinates when permitted and posts them; the controller falls back to IP-based location when coordinates are missing, reverse-geocodes the result, and stores it. The landing page reads recent records and displays them in a table and map. The route definitions were not sampled, so route-to-controller wiring is omitted.
Main entry points: Controller.php Request controller · GeoData.php Geo records · landing_page.blade.php Landing page
Components 10
Web experience
- Landing page
resources/views/landing_page.blade.php - Browser geolocation
- OpenStreetMap tiles
Location processing
- Request controller
app/Http/Controllers/Controller.php - IP location API
- OpenCage geocoder
Persistence
- Geo records
app/Models/GeoData.php - SQL database
Other components
- Visitor
- Browser
Connections 12
- Visitor → Browser: opens page
- Browser → Browser geolocation: requests position
- Browser geolocation → Browser: returns coordinates
- Browser → Request controller: posts coordinates
- Request controller → IP location API: looks up IP
- Request controller → OpenCage geocoder: reverse geocodes
- Request controller → Geo records: creates record
- Geo records → SQL database: writes and queries
- Request controller → Geo records: loads recent records
- Request controller → Landing page: renders page
- Landing page → Browser: returns HTML
- Browser → OpenStreetMap tiles: loads map tiles