irfa/app-license-server

Fund package maintenance!
Patreon
Ko Fi

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 4

Open Issues: 0

Type:package

v1.2 2020-12-18 03:08 UTC

This package is auto-updated.

Last update: 2024-07-18 13:38:39 UTC


README

Scrutinizer Code Quality Build Status Latest Stable Version GitHub license

Support me ko-fi

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?

  1. Fork it (https://github.com/irfaardy/app-license-server/fork)
  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/app-license-server/issues so that they can be maintained together.

Bagaimana cara berkontribusi?

  1. Lakukan fork di (https://github.com/irfaardy/app-license-server/fork)
  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/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.