Skip to content

Instantly share code, notes, and snippets.

@erdum
Last active July 10, 2025 06:20
Show Gist options
  • Save erdum/fc7dab3427b872865c35a638ccc3e061 to your computer and use it in GitHub Desktop.
Save erdum/fc7dab3427b872865c35a638ccc3e061 to your computer and use it in GitHub Desktop.
Get User Region Data from Request IP
<?php
use Torann\GeoIP\Facades\GeoIP;
$location = GeoIP::getLocation(request()->ip());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment