PHP code example of eluki / license-client

1. Go to this page and download the library: Download eluki/license-client 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/ */

    

eluki / license-client example snippets


 ->withMiddleware(function (Middleware $middleware): void {
        //Adiconando middleware aqui
        $middleware->alias([
            'license.check' => \LicenseClient\Http\Middleware\LicenseCheck::class,
        ]);
    })

use LicenseClient\Http\Controllers\LicenseController;
Route::middleware('license.check')->group(function () {
    Route::get('/activate', [LicenseController::class, 'activateForm'])->name('license.activate.form');
    Route::post('/activate', [LicenseController::class, 'activate'])->name('license.activate');
    Route::get('/request-code', [LicenseController::class, 'requestCode'])->name('license.request');
    Route::get('/import/upload-key', [LicenseController::class, 'formKeyPublic'])->name('import.uploadKey');
    Route::post('/uploadkey', [LicenseController::class, 'uploadKey'])->name('client.uploadKey');
});
bash
php artisan vendor:publish --provider="LicenseClient\ClientServiceProvider"
bash
php artisan migrate
bash
php artisan migrate --path=database/migrations/vendor/license-server

license-client/
├── src/
│   ├── Helpers/
│   │   ├── globalVariables.php
│   │   ├── HardwareHelper.php
│   │   └── LicenseHelper.php
│   ├── Http/
│   │   ├── Controllers/
│   │   │   └── LicenseController.php
│   │   ├── Middleware/
│   │   │   ├── LicenseCheck.php
│   │   │   └── CheckLicense.php
│   │   └── ClientServiceProvider.php
│   ├── Models/
│   │   └── License.php
│   └── Services/
│       └── LicenseService.php
├── config/
│   └── license.php
├── database/
│   └── migrations
├── resources/
│   └── views
├── routes/
│   └── web.php
├── composer.json
└── README.md