Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oefenweb/cakephp-vat-number-check
A VAT number check Plugin for CakePHP
https://github.com/oefenweb/cakephp-vat-number-check
cakephp cakephp2 cakephp3 php plugin vat-number vat-validation
Last synced: about 1 month ago
JSON representation
A VAT number check Plugin for CakePHP
- Host: GitHub
- URL: https://github.com/oefenweb/cakephp-vat-number-check
- Owner: Oefenweb
- License: mit
- Created: 2014-01-09T15:05:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T23:17:04.000Z (over 4 years ago)
- Last Synced: 2024-04-18T05:03:29.347Z (8 months ago)
- Topics: cakephp, cakephp2, cakephp3, php, plugin, vat-number, vat-validation
- Language: PHP
- Size: 133 KB
- Stars: 3
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# VatNumberCheck plugin for CakePHP
[![Build Status](https://travis-ci.org/Oefenweb/cakephp-vat-number-check.png?branch=master)](https://travis-ci.org/Oefenweb/cakephp-vat-number-check)
[![PHP 7 ready](http://php7ready.timesplinter.ch/Oefenweb/cakephp-vat-number-check/badge.svg)](https://travis-ci.org/Oefenweb/cakephp-vat-number-check)
[![Coverage Status](https://codecov.io/gh/Oefenweb/cakephp-vat-number-check/branch/master/graph/badge.svg)](https://codecov.io/gh/Oefenweb/cakephp-vat-number-check)
[![Packagist downloads](http://img.shields.io/packagist/dt/Oefenweb/cakephp-vat-number-check.svg)](https://packagist.org/packages/oefenweb/cakephp-vat-number-check)
[![Code Climate](https://codeclimate.com/github/Oefenweb/cakephp-vat-number-check/badges/gpa.svg)](https://codeclimate.com/github/Oefenweb/cakephp-vat-number-check)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Oefenweb/cakephp-vat-number-check/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Oefenweb/cakephp-vat-number-check/?branch=master)## 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:
```
CakePlugin::load('VatNumberCheck', ['routes' => true]);
```## Usage
### Model
Normalizes a VAT number:
```
$vatNumber = $this->VatNumberCheck->normalize($vatNumber);
```Checks a given VAT number:
```
$vatNumberValid = $this->VatNumberCheck->check($vatNumber);
```### Helper
Generates a VAT number check form field:
```
echo $this->VatNumberCheck->input('vat_number', ['label' => __('VAT number')]);
```