irfa / app-license-server
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 4
Open Issues: 0
Type:package
Requires
- php: ^7.2
- ext-json: *
- irfa/php-sn-generator: ^1.0
- laravel/framework: ^6.0|^7.0
README
This plugin functions to create a serial number that will be accessed using plugin Client side License
🛠️ Installation with Composer
composer require irfa/app-license-server
You can get Composer here
🛠️ Laravel Setup
Add to config/app.php
'providers' => [
....
Irfa\AppLicenseServer\AppLicenseServerServiceProvider::class,
];
Add to config/app.php
'aliases' => [
....
'ALS' => Irfa\AppLicenseServer\Facades\AppLicenseServer::class,
],
Publish Vendor
php artisan vendor:publish --tag=app-license-server
Run Migration
php artisan migrate
Config File
config/irfa/app_license_server.php
Inside Config File
<?php return [ 'license_route' => '/check/license', 'route_name' => 'check_license', 'char_type' => 'alphanumeric', //Type alphanumeric,numeric,or alphabet 'length' => 4,//default : 4 'segment' => 4,//default : 4 'striped' => true,//default : true ];
Register New Serial Number License
<?php namespace App\Http\Controllers; use ALS; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class LicenseController extends Controller { public function register(Request $request) { return ALS::register(['name'=>"Lorem", 'domain'=>"example.com", 'phone_number'=>"08123123", 'address'=>"Bandung,Indonesia"],now()->addDays(30)); } }
Check License
<?php namespace App\Http\Controllers; use ALS; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class LicenseController extends Controller { public function check(Request $request) { return ALS::serial($request->serial)->check(); } }
Disabled Serial number
ALS::serial($request->serial)->disabled();
Enabled serial number
ALS::serial($request->serial)->disabled();
##How to Contributing?
- Fork it (https://github.com/irfaardy/app-license-server/fork)
- Commit your changes (
git commit -m 'New Feature'
) - Push to the branch (`git push origin your-branch)
- Create a new Pull Request
your-branch -> master
if you found bug or error, please post here https://github.com/irfaardy/app-license-server/issues so that they can be maintained together.
Bagaimana cara berkontribusi?
- Lakukan fork di (https://github.com/irfaardy/app-license-server/fork)
- Commit perubahan yang anda lakukan (
git commit -m 'Fitur Baru'
) - Push ke branch master (`git push origin branch-kamu)
- Buat Pull Request baru
branch-kamu -> master
Issue
If you found issues or bug please create new issues here https://github.com/irfaardy/app-license-server/issues/new
Jika anda menemukan bug atau error silahkan posting disini https://github.com/irfaardyapp-license-server/issues agar dapat diperbaiki bersama-sama.