定制 adiesel82/geoservice-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

adiesel82/geoservice-laravel

Composer 安装命令:

composer require adiesel82/geoservice-laravel

包简介

SypexGeo Laravel 5.5 service

README 文档

README

GeoIP Laravel 5.5 service

For the current moment SyperGeo service implemented only: https://sypexgeo.net

Plaese follow next steps for install:

1) add dependence:

composer require adiesel82/geoservice-laravel

2) add next items into config/app.php

'providers' => [
    ADiesel82\GeoService\GeoServiceProvider::class,
]
 
'aliases' => [
    'Geo' => ADiesel82\GeoService\GeoServiceFacade::class,
]

3) publish config with artisan:

php artisan vendor:publish

Type 0 to publish all or a digit near ADiesel82\GeoService\GeoServiceProvider

[8 ] Provider: ADiesel82\GeoService\GeoServiceProvider

It is 8 in example below and hit enter.

As result you can find geo.php in the config folder.

For the current moment SyperGeo service supported only.

Ready

Usage example:

$result = \Geo::get(\request()->ip());
dd($result);

As result:

{#129 ▼
  +"city": {#128 ▼
    +"id": 524901
    +"lat": 55.75222
    +"lon": 37.61556
    +"name_ru": "Москва"
    +"name_en": "Moscow"
  }
  +"country": {#130 ▼
    +"id": 185
    +"iso": "RU"
  }
}

Auto update database with composer

"post-install-cmd": [
  "ADiesel82\\GeoService\\ComposerScripts::postInstall"
],
"post-update-cmd": [
  "ADiesel82\\GeoService\\ComposerScripts::postUpdate"
],

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固