PHP code example of slashplus / identity

1. Go to this page and download the library: Download slashplus/identity 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/ */

    

slashplus / identity example snippets


// note: this example contains invalid data, but you get an idea
$validator = \Slashplus\Identity\AgeVerification::create([
    [
    'serial' => '5484197598', 
    'birth' => '9512210', 
    'expire' => '4702025', 
    'nationality' => 'D', 
    'checksum' => '4'
    ]
]);

// regular illuminate methods i.e.
$validatedData = $validator->validated(); // array of validated Data (throws exception)

// additional data i.e.
$validatedBirth = $validator->validatedBirthDate(); // DateTime object (throws exception)
$validatedExpire = $validator->validatedExpireDate(); // DateTime object (throws exception)