https://github.com/muath-ye/unique-random-number
Generate ranged digits random number from table id, so its unique.
https://github.com/muath-ye/unique-random-number
Last synced: 3 months ago
JSON representation
Generate ranged digits random number from table id, so its unique.
- Host: GitHub
- URL: https://github.com/muath-ye/unique-random-number
- Owner: muath-ye
- License: mit
- Created: 2020-07-23T18:06:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-24T08:00:09.000Z (almost 5 years ago)
- Last Synced: 2025-01-28T14:47:10.528Z (4 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Generate Unique Random Number Based On Table Id
==============Generate ranged digits random number from table id, so its unique.
## Requirements
- [PHP >= 5.0](http://php.net/)## Installation
To install through composer, run the following command from terminal:
composer require "muath-ye/unique-random-number"
### For laravel users
if you are using laravel project, and you want to use it without declaration the use statement. Register ```Random``` alias on your `config/app.php` file.
```php
'aliases' => [
// ...,
'Random' => \Muathye\UniqueRandomNumber\Random::class
]
```## Usage
```php
628Random::generate(1, 4, 6);
// Out Put => 8314Random::generate(1624, 4, 6);
// Out Put => 16248Random::generate(54627, 4, 6);
// Out Put => 546276Random::generate(54627, 4, 6);
// Out Put => 546276
```
### SecurityIf you discover any security-related issues, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker.
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.