Skip to content

About

Spanish ID random generator

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Random Spain ID generator

Spanish CIF, NIF and NIE random generator.

Installation

composer require chuano/spain-document-generator

Usage

All parameters are optional. By default the separator will be empty and the type will be B.

<?php
require_once 'vendor/autoload.php';

use Chuano\Util\SpainDocumentGenerator\SpainDocumentGenerator;

$generator = new SpainDocumentGenerator();

// CIF type 'B' and control digit separator char '-'
$cif = $generator->cif('B', '-');
// Control digit char '-'
$nif = $generator->nif('-');
// Control digit char '-'
$nie = $generator->nie('-');

About

Spanish ID random generator

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages