项目作者: Oefenweb

项目描述 :
A VAT number check Plugin for CakePHP
高级语言: PHP
项目地址: git://github.com/Oefenweb/cakephp-vat-number-check.git
创建时间: 2014-01-09T15:05:11Z
项目社区:https://github.com/Oefenweb/cakephp-vat-number-check

开源协议:MIT License

下载


VatNumberCheck plugin for CakePHP

Build Status
PHP 7 ready
Coverage Status
Packagist downloads
Code Climate
Scrutinizer Code Quality

Requirements

  • CakePHP 2.9.0 or greater.
  • PHP 7.0.0 or greater.

Installation

Clone/Copy the files in this directory into app/Plugin/VatNumberCheck

Configuration

Ensure the plugin is loaded in app/Config/bootstrap.php by calling:

  1. CakePlugin::load('VatNumberCheck', ['routes' => true]);

Usage

Model

Normalizes a VAT number:

  1. $vatNumber = $this->VatNumberCheck->normalize($vatNumber);

Checks a given VAT number:

  1. $vatNumberValid = $this->VatNumberCheck->check($vatNumber);

Helper

Generates a VAT number check form field:

  1. echo $this->VatNumberCheck->input('vat_number', ['label' => __('VAT number')]);