{"id":21959349,"url":"https://github.com/adrianorsouza/laravel-geolocation","last_synced_at":"2025-04-13T06:37:00.358Z","repository":{"id":41384163,"uuid":"202234392","full_name":"adrianorsouza/laravel-geolocation","owner":"adrianorsouza","description":"Laravel package to get the details about Region, City and Country for a given IP Address.","archived":false,"fork":false,"pushed_at":"2025-04-10T17:14:20.000Z","size":38,"stargazers_count":61,"open_issues_count":1,"forks_count":15,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T18:46:45.924Z","etag":null,"topics":["geoip","geoip2","geolocation","ip","ipinfo","iplookup","iplookup-php","laravel"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianorsouza.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T22:50:25.000Z","updated_at":"2025-04-10T17:09:11.000Z","dependencies_parsed_at":"2024-11-29T09:40:07.352Z","dependency_job_id":null,"html_url":"https://github.com/adrianorsouza/laravel-geolocation","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.04255319148936165,"last_synced_commit":"eab4560b28fa84cb0ced530269582f22944ce324"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianorsouza%2Flaravel-geolocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianorsouza%2Flaravel-geolocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianorsouza%2Flaravel-geolocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianorsouza%2Flaravel-geolocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianorsouza","download_url":"https://codeload.github.com/adrianorsouza/laravel-geolocation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675312,"owners_count":21143763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geoip","geoip2","geolocation","ip","ipinfo","iplookup","iplookup-php","laravel"],"created_at":"2024-11-29T09:27:49.132Z","updated_at":"2025-04-13T06:37:00.321Z","avatar_url":"https://github.com/adrianorsouza.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Laravel GeoLocation Package\n===========================\n\nLaravel package to get the details about Region, City and Country for a given IP Address.\n\nThis package is a wrapper for [IpInfo](https://ipinfo.io) Provider, however we have plan to implement a driver for \nMaxMind GeoIP2 databases.\n\n### Install\n\n    composer require adrianorosa/laravel-geolocation\n\n\u003e This package supports the latest version of Laravel, for now 5.8+ was tested, but older versions should work fine.\n\nAs of Laravel 5.5 there is no need to add the ServiceProvider within the `AppServiceProvider` array. \nLaravel loads this provider using Package Discovery.\n\n### Usage\n\nThere is no need to additional setup to start using, once you install it via composer you can call the Facade:\n\n```php\n\u003c?php\nuse Adrianorosa\\GeoLocation\\GeoLocation;\n\n$details = GeoLocation::lookup('8.8.8.8');\n\necho $details-\u003egetIp();\n// 8.8.8.8\n\necho $details-\u003egetCity();\n// Mountain View\n\necho $details-\u003egetRegion();\n// California\n\necho $details-\u003egetCountry();\n// United States\n\necho $details-\u003egetLatitude();\n// 37.386\n\necho $details-\u003egetLongitude();\n// -122.0838\n\nvar_dump($details-\u003etoArray());\n// Array\n// (\n//  [city] =\u003e Mountain View\n//  [region] =\u003e California\n//  [country] =\u003e United States\n//  [countryCode] =\u003e US\n//  [latitude] =\u003e 37.386\n//  [longitude] =\u003e -122.0838\n//)\n``` \n\n### Console Command\n\nTo display details about an Ip or Your current network Ip Address you may use the artisan command: \n\n```bash\nphp artisan geolocation:lookup --ip 8.8.8.8\n\n+---------+---------------+------------+----------------+-------------+----------+-----------+\n| ip      | city          | region     | country        | countryCode | latitude | longitude |\n+---------+---------------+------------+----------------+-------------+----------+-----------+\n| 8.8.8.8 | Mountain View | California | Estados Unidos | US          | 37.386   | -122.0838 |\n+---------+---------------+------------+----------------+-------------+----------+-----------+\n```\n\n## Override Configuration and translations\n\nThis package comes with a little configuration for IpInfo and translations for Country Names.\n\nYou can stick with default values, which works fine, or publish using the following commands:\n\nPublish all config and translations \n\n    php artisan vendor:publish\n\nPublish config\n\n    php artisan vendor:publish --tag=geolocation-config\n    \nPublish translations\n\n    php artisan vendor:publish --tag=geolocation-translations\n    \n    \n## Author\n\n**Adriano Rosa** (https://adrianorosa.com)  \n\n## Licence\n\nCopyright © 2021, Adriano Rosa  \u003cinfo@adrianorosa.com\u003e\nAll rights reserved.\n\nFor the full copyright and license information, please view the LICENSE \nfile that was distributed within the source root of this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianorsouza%2Flaravel-geolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianorsouza%2Flaravel-geolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianorsouza%2Flaravel-geolocation/lists"}