2017 © Pedro Peláez
 

library ip-city

ip to city for 17mon.cn

image

zsping1989/ip-city

ip to city for 17mon.cn

  • Saturday, September 16, 2017
  • by zsping1989
  • Repository
  • 1 Watchers
  • 0 Stars
  • 362 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 58 % Grown

The README.md

ip2city

17mon for Laravel 5, (*1)

安装

  1. 安装包文件, (*2)

    composer require "mylukin/ip2city:dev-master"
    
  2. 添加 ServiceProvider 到您项目 config/app.php 中的 providers 部分:, (*3)

    'MyLukin\IP2City\ServiceProvider',
    
  3. 创建配置文件:, (*4)

    php artisan vendor:publish --provider="MyLukin\IP2City\ServiceProvider"
    

    然后请修改 config/ip2city.php 中对应的项即可。, (*5)

  4. 添加下面行到 config/app.phpaliases 部分:, (*6)

    'IP2City' => 'MyLukin\IP2City\Facade',
    

使用

由于我们已经添加了Facade IP2City,那么我们可以在控制器或者其它任何地方使用 IP2City::方法名 方式调用。, (*7)

下面写一个例子:, (*8)

<?php namespace App\Http\Controllers;

use IP2City;

class WelcomeController extends Controller {

    public function index()
    {
        var_dump(IP2City::ip2addr('115.28.212.163'));
    }
}

License

MIT, (*9)

The Versions

16/09 2017

dev-master

9999999-dev

ip to city for 17mon.cn

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by zhangshiping

ip city ip2city 17mon

16/09 2017

dev-dev

dev-dev

ip to city for 17mon.cn

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by zhangshiping

ip city ip2city 17mon

16/09 2017

v0.0.4

0.0.4.0

ip to city for 17mon.cn

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by zhangshiping

ip city ip2city 17mon

16/09 2017

v0.0.3

0.0.3.0

ip to city for 17mon.cn

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by zhangshiping

ip city ip2city 17mon