An open API service indexing awesome lists of open source software.

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.

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
628

Random::generate(1, 4, 6);
// Out Put => 8314

Random::generate(1624, 4, 6);
// Out Put => 16248

Random::generate(54627, 4, 6);
// Out Put => 546276

Random::generate(54627, 4, 6);
// Out Put => 546276
```
### Security

If 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.