A package to generate and validate a LEI (Legal Entity Identifier).
You can install the package via composer:
composer require k2oumais/lei
You can publish the config file with:
php artisan vendor:publish --tag="lei-config"
This is the contents of the published config file:
return [
/*
|--------------------------------------------------------------------------
| LEI Prefix
|--------------------------------------------------------------------------
|
| This is the Local Operating Unit (LOU) code.
|
*/
'lou_code' => env('LEI_LOU_CODE', '1234'),
/*
|--------------------------------------------------------------------------
| LEI Reserved
|--------------------------------------------------------------------------
|
| This is the reserved value of an LEI.
|
*/
'reserved' => env('LEI_RESERVED_VALUE', '00'),
];
$lei = new K2ouMais\Lei\Lei();
// Generate a LEI
$generatedLei = $lei->generate(); // 123400V9I8UWAKBIWH79
// Validate a LEI
$validateLei = $lei->validate('123400V9I8UWAKBIWH79'); // true
$validateLei = $lei->validate('12340013KCVCMU58YY44'); // false
composer test
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.