PHP code example of finext / license-client

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

    

finext / license-client example snippets


use Finext\LicenseClient\Facades\License;

$result = License::check();
// [
//     'valid' => true,
//     'status' => 'active', // or grace_period, grace_period_expired, not_activated, unreachable_no_cache
//     'source' => 'live',    // or 'cache'
//     'days_remaining' => 29,
//     'data' => [...],       // full verified envelope data, when available
// ]

Route::middleware('license.valid')->group(function () {
    // ...
});

License::installationId();      // stable UUID for this installation
License::isActivated();         // whether an activation secret is stored
License::verify($domain);       // one-off live verify call
License::heartbeat($appVersion);
License::deactivate();          // deactivates server-side and clears local state
License::forget();              // clears local state only (secret + cache)
bash
php artisan vendor:publish --tag=license-client-config
bash
php artisan license:activate
# or: php artisan license:activate LICENSE-KEY --domain=example.com --label="Production"