PHP code example of irfa / app-license-server

1. Go to this page and download the library: Download irfa/app-license-server library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

irfa / app-license-server example snippets


 
	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



];

    	
    



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));	
    }
}



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();	
    }

}

ALS::serial($request->serial)->disabled();	

ALS::serial($request->serial)->disabled();

php artisan migrate