PHP code example of dipta995 / laravel-codicefiscale
1. Go to this page and download the library: Download dipta995/laravel-codicefiscale library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use CodiceFiscale;
//Check Validation
CodiceFiscale::validateFiscalCode($jsonData);
//Fetch All states
$jsonData = CodiceFiscale::getJsonData();
//Generate Fiscal Code with State validation or without validation
// using true as 6th param that is not mandatory
CodiceFiscale::generateCodiceFiscale($surname, $name, $dob, $gender, $placeCode,true);