{"id":18412188,"url":"https://github.com/midnite81/geolocation","last_synced_at":"2025-09-11T05:06:08.404Z","repository":{"id":62528405,"uuid":"70997524","full_name":"midnite81/geolocation","owner":"midnite81","description":"A laravel integration for using the IPInfoDB and Ip2Location services","archived":false,"fork":false,"pushed_at":"2022-08-17T21:34:00.000Z","size":121,"stargazers_count":38,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T11:37:21.337Z","etag":null,"topics":["geolocation","geolocation-api","ip2location","ipinfodb","laravel","laravel-package"],"latest_commit_sha":null,"homepage":"https://midnite.uk/github/geolocation","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midnite81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-15T15:51:35.000Z","updated_at":"2025-01-04T02:38:05.000Z","dependencies_parsed_at":"2022-11-02T11:01:12.570Z","dependency_job_id":null,"html_url":"https://github.com/midnite81/geolocation","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/midnite81/geolocation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnite81%2Fgeolocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnite81%2Fgeolocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnite81%2Fgeolocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnite81%2Fgeolocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midnite81","download_url":"https://codeload.github.com/midnite81/geolocation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnite81%2Fgeolocation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274579587,"owners_count":25310964,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["geolocation","geolocation-api","ip2location","ipinfodb","laravel","laravel-package"],"created_at":"2024-11-06T03:40:12.030Z","updated_at":"2025-09-11T05:06:08.369Z","avatar_url":"https://github.com/midnite81.png","language":"PHP","readme":"# Geolocation [![Latest Stable Version](https://poser.pugx.org/midnite81/geolocation/version)](https://packagist.org/packages/midnite81/geolocation) [![Total Downloads](https://poser.pugx.org/midnite81/geolocation/downloads)](https://packagist.org/packages/midnite81/geolocation) [![Latest Unstable Version](https://poser.pugx.org/midnite81/geolocation/v/unstable)](https://packagist.org/packages/midnite81/geolocation) [![License](https://poser.pugx.org/midnite81/geolocation/license.svg)](https://packagist.org/packages/midnite81/geolocation) [![Build](https://travis-ci.org/midnite81/geolocation.svg?branch=master)](https://travis-ci.org/midnite81/geolocation) [![Coverage Status](https://coveralls.io/repos/github/midnite81/geolocation/badge.svg?branch=master)](https://coveralls.io/github/midnite81/geolocation?branch=master)\n\nA IP Info DB integration for Laravel\n\n# Versioning\n\n| Version | Branch    | PHP    | Laravel | Notes                                                                        |\n|---------|-----------|--------|---------|------------------------------------------------------------------------------|\n| ^4.0    | master/v4 | \\\u003e=8.1 | \\\u003e=8    | Update to include wrap Ip2Location in addition to IpInfoDb, moved to php 8.1 |\n| ^3.0    | v3        | \\\u003e=7.4 | \\\u003e=6    | Facade has been removed and guzzle dependency has been updated to version 7  |\n| ^2.0    | v2        | \\\u003e=5.6 | \\\u003e=5    | Corrects issues with composer 2.0                                            |\n| ^1.0    | v1        | \\\u003e=5.6 | \\\u003e=5    | First release - not compatible with composer 2.0                             |\n\n# Upgrading to v4.0\n\nPlease note:\n\n- version 4 brings in the ability to wrap both the IpInfoDb service (as was available in previous versions)\n  and the Ip2Location service.  IpInfoDb are not accepting new registrations and are asking users to register at\n  Ip2Location instead.\n- version 4 minimum requirements are php 8.1 to make use of the additional features php 8.1 brings, such as enums\n  and better type safety.\n- version 4 has an updated config file. If you are upgrading, I would suggest checking out the\n  [config file](/config/geolocation.php) and updating your local instance of it.\n- a change has been made to the caching from minutes to seconds.\n\n\n# Installation\n\nIf installing on anything below PHP 8.1, please checkout the v2 or v3 branch and follow the\ninstructions on the readme for that branch. Please note ip2location is not supported on previous versions of this\npackage\n\nThis package requires PHP 8.1+, and includes a Laravel Service Provider.\n\nTo install through composer include the package in your `composer.json`.\n\n    \"midnite81/geolocation\": \"^4.0\"\n\nRun `composer install` or `composer update` to download the dependencies, or you can run\n`composer require midnite81/geolocation`.\n\n## Laravel Integration\n\nThis package makes use of Laravel's auto package loader, so you shouldn't need to add this\nto your config/app.php file. However, if you've disabled this then you'll need to add the\nGeoLocation service provider to the list of service providers\nin `app/config/app.php`.\n\n    'providers' =\u003e [\n      Midnite81\\GeoLocation\\GeoLocationServiceProvider::class\n    ];\n\nPublish the config and migration files using\n`php artisan vendor:publish --provider=\"Midnite81\\GeoLocation\\GeoLocationServiceProvider\"`\n\n# Configuration File\n\nOnce you have published the config files, you will find a `geolocation.php` file in the\n`config` folder. You should look through these settings and update these where necessary.\n\n# Env\n\nYou will need to add the following to your `.env` file and update these with your own\nsettings. Please note you will only need to fill in the api key for the service you are using.\n\n```dotenv\nGEOLOCATION_IPINFODB_API_KEY=\u003cip_info_db_api_key\u003e\nGEOLOCATION_IP2LOCATION_API_KEY=\u003cip2location_api_key\u003e\nGEOLOCATION_CACHE=\u003cduration_in_seconds\u003e\n```\n\n# Get your GeoLocation API Key\n\nBefore using this package you'll need to obtain an API Key from either [IpInfoDb](http://ipinfodb.com/register)\nwhich is no longer accepting new registrations or [Ip2Location](https://www.ip2location.io/sign-up).\n\nOnce you have signed up you will need to add your api key to the relevant `.env` key; `GEOLOCATION_IPINFODB_API_KEY` for\nIpInfoDb or `GEOLOCATION_IP2LOCATION_API_KEY` for Ip2Location.\n\n# Caching\n\nThis package allows you to cache responses, however it is your responsibility to ensure you're not breaking any\nterms and conditions of use.\n\n# Rate Limiting\n\nThis package does not set any rate limiting internally. You should ensure that your application adheres to any rate\nlimiting set by your chosen provider.\n\n\n# Example Usage and Available Methods and Properties\n\n- [IpInfoDb example usage and available methods](/readme_ipinfodb.md)\n- [Ip2Location example usage and available methods](/readme_ip2location.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidnite81%2Fgeolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidnite81%2Fgeolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidnite81%2Fgeolocation/lists"}