承接 cyber-duck/laravel-maxmind-geolocate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cyber-duck/laravel-maxmind-geolocate

最新稳定版本:v1.0.2

Composer 安装命令:

composer require cyber-duck/laravel-maxmind-geolocate

包简介

Laravel Package to utilise MaxMind GeoLite2 Database for IP based GeoLocation

README 文档

README

This package utilises the MaxMind GeoLite databases to allow GeoLocation of an IP Address.

Console Commands

php artisan geolocation:update

Downloads a recent archive of the database from MaxMind, validates the hash, and stores on a remote disk (e.g S3) as specified in configuration.

php artisan geolocation:fetch

Fetches, extracts, and moves to application storage, the archive previously stored on a remove disk (e.g S3)

Usage

Once a database has been downloaded and extracted to the app local storage directory, to geolocate an IP address, use the provided facade, as such:

use CyberDuck\GeoLocate\Facades\GeoLocate;

$result = GeoLocate::country('1.2.3.4');

// $result is an instance of \GeoIp2\Record\Country

$result->isoCode // == 'GB' for example.

统计信息

  • 总下载量: 208
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 11
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-26