定制 vldmir/laravel-iso3166 二次开发

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

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

vldmir/laravel-iso3166

最新稳定版本:v1.1.1

Composer 安装命令:

composer require vldmir/laravel-iso3166

包简介

A Laravel wrapper for the league/iso3166 package.

README 文档

README

Latest Version on Packagist Total Downloads License

Laravel ISO3166 provides a convenient wrapper for the league/iso3166 library, allowing you to retrieve country information within your Laravel applications.

Installation

Install via Composer:

composer require vldmir/laravel-iso3166

If using Laravel <5.5, manually add service provider and facade:

'providers' => [
    Vldmir\LaravelIso3166\Providers\CountryServiceProvider::class,
],
'aliases' => [
    'CountryService' => Vldmir\LaravelIso3166\Facades\CountryService::class,
],

Usage

use CountryService;

// Retrieve country by name
$country = CountryService::getByName('Canada');
echo $country->name;    // Canada
echo $country->alpha2;  // CA

// Retrieve country by alpha-2 code
$country = CountryService::getByAlpha2('US');
echo $country->name;    // United States of America

// Retrieve country by numeric code
$country = CountryService::getByNumeric('124');
echo $country->name;    // Canada

Testing

Run tests using PHPUnit:

vendor/bin/phpunit

Changelog

Please see CHANGELOG for recent changes.

Contributing

Contributions are welcome! Please see CONTRIBUTING for details.

Security

If you discover any security issues, please email vld.romantsov@gmail.com.

Credits

License

The MIT License (MIT). Please see LICENSE for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-11