oefenweb / cakephp-vat-number-check
A VAT number check Plugin for CakePHP
Installs: 14 341
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 6
Open Issues: 1
Type:cakephp-plugin
Requires
- php: >=7.1
- ext-soap: *
- cakephp/cakephp: ^3.8
- composer/installers: ~1.0
Requires (Dev)
- oefenweb/cakephp-codesniffer: ^3.0.0
- phan/phan: ^1.3
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^5.7.14|^6.0
- psy/psysh: @stable
- sebastian/phpcpd: ^3.0
README
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')]);