Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 830 Bytes

readme.md

File metadata and controls

34 lines (25 loc) · 830 Bytes

Code generator

Memory release: 1.1 License: MIT

This package generate approved codes. Example: 1224, 456678, etc.

Installation

composer require tkachikov/code-generator

Usage

Code generate for length 4

$code = CodeGenerator::get(4); // 0123

Code generate for length 6

$code = CodeGenerator::get(6); // 123456

Equal codes

$hasCode = '0123';
$requestCode = 123;
$equal = CodeGenerator::equals($hasCode, $requestCode); // true

License

This package is open-sourced software licensed under the MIT license.