Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/irfaardy/php-sn-generator

Customable Serial Number Generator for PHP Native, Laravel and other PHP Framework
https://github.com/irfaardy/php-sn-generator

laravel laravel-framework laravel-package license lightweight php-native php-serial-number plugins randomizer security serial-number serial-number-generator serial-numbers sn-generator unique-id

Last synced: about 20 hours ago
JSON representation

Customable Serial Number Generator for PHP Native, Laravel and other PHP Framework

Awesome Lists containing this project

README

        

# 🚀PHP Serial Number Generator
[![Maintainability](https://api.codeclimate.com/v1/badges/3f4b5d10a870b2301715/maintainability)](https://codeclimate.com/github/irfaardy/php-sn-generator/maintainability) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/irfaardy/php-sn-generator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/irfaardy/php-sn-generator/?branch=master) ![PHP Composer](https://github.com/irfaardy/php-sn-generator/workflows/PHP%20Composer/badge.svg?branch=master) [![Latest Stable Version](https://poser.pugx.org/irfa/php-sn-generator/v)](//packagist.org/packages/irfa/php-sn-generator) [![GitHub license](https://img.shields.io/github/license/irfaardy/encrypt-file-laravel?style=flat-square)](https://github.com/irfaardy/encrypt-file-laravel/blob/master/LICENSE)

[![Support me](https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-yellow.svg?style=flat-square)](https://www.buymeacoffee.com/irfaardy) [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S52P7SN)
[![Packagist Downloads](https://img.shields.io/packagist/dm/irfa/php-sn-generator.svg?label=Downloads)](https://packagist.org/packages/irfa/php-sn-generator)

Demo https://phpsngenerator.herokuapp.com/ or demo source code https://github.com/irfaardy/php-sn-generator-demo

Customable Serial Number Generator for PHP.


Where can this be used?


  1. Serial number on the application

  2. Security Token

  3. Vouchers Serial

  4. Activation Apps Serial

  5. Reset Password link token

  6. API Key

  7. etc.



🛠️ Installation with Composer

composer require irfa/php-sn-generator

>You can get Composer [ here]( https://getcomposer.org/download/)

***

🛠️ Laravel Setup

Add to config/app.php

```php
'providers' => [
....
Irfa\SerialNumber\SerialNumberGeneratorSeviceProvider::class,
];
```

Add to config/app.php

```php
'aliases' => [
....
'SN' => Irfa\SerialNumber\Facades\SerialNumber::class,

],
```

Publish Vendor

```bash
php artisan vendor:publish --tag=php-serial-number
```

Config File

Config Laravel

```bash
config/irfa/serial_number.php
```

Config non-Laravel or PHP Native

```bash
vendor/irfa/php-sn-generator/config/config.php
```

```php
4,

'segment' => 4,

'seperator' => "-",

'charset' => "0123456789ABCDEFGHIJKLMNPQRSTUWXYZ",

];
```

Example Generate Serial Number (Laravel)

```php
Example Generate Serial Number PHP Native

```php
generate(); //result : TP8K-XU63-9YN3-SMSF

```

Other Function


Programmatically Config

```php
//Laravel
SN::setConfig([
'length' => 5,
'segment' => 4,
'seperator' => '-',
'charset' => "123456789ABCDEFGH"])
->generate();

//PHP Native
$sn = new SerialNumber();

echo $sn->setConfig([
'length' => 5,
'segment' => 4,
'seperator' => '-',
'charset' => "123456789ABCDEFGH"
])
->generate();
```

----

## How to Contributing?

1. Fork it ()
2. Commit your changes (`git commit -m 'New Feature'`)
3. Push to the branch (`git push origin your-branch)
4. Create a new Pull Request ` your-branch -> master`

if you found bug or error, please post here https://github.com/irfaardy/php-sn-generator/issues so that they can be maintained together.

***
## Bagaimana cara berkontribusi?

1. Lakukan fork di ()
2. Commit perubahan yang anda lakukan (`git commit -m 'Fitur Baru'`)
3. Push ke branch master (`git push origin branch-kamu)
4. Buat Pull Request baru `branch-kamu -> master`

---
## Issue
If you found issues or bug please create new issues here https://github.com/irfaardy/php-sn-generator/issues/new

Jika anda menemukan bug atau error silahkan posting disini https://github.com/irfaardy/php-sn-generator/issues agar dapat diperbaiki bersama-sama.

***