friskals/countries 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

friskals/countries

最新稳定版本:v2.2.3

Composer 安装命令:

composer require friskals/countries

包简介

Nominal formatting and phone validation for Laravel Framework

README 文档

README

This package allow you

  • Set the nominal and currency format of a value based on the given country.
  • Validate and transform phone number of a particular country.

Instalation

  • Install with composer
composer require friskals/countries

For Laravel >=5.5 that's all. You don't need any configurations since it's already handled by Laravel Package Discovery but for Lumen you need a simple configuration.

Configuration

The default are set in config/country.php.

Lumen

  • Load your configuration file in bootstrap/app.php
     $app->configure('country');
  • And register your provider at bootstrap/app.php
    $app->register(Friskals\Countries\Providers\CountryServiceProvider::class);

Usage

  • Format Currency
$nominal_currency = Friskals\Countries\CountryLoader::country('ID')->format_currency(1000); 
  • Format Nominal
$nominal = Friskals\Countries\CountryLoader::country('ID')->format_nominal(1000);
  • Validate Phone
$is_validated = Friskals\Countries\CountryLoader::country('ID')->validate_phone('+6208120812081');
  • Transform Phone
$phone = Friskals\Countries\CountryLoader::country('ID')->transform_phone('+6208120812081');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-08