1. Go to this page and download the library: Download groupesti/laravel-license 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/ */
groupesti / laravel-license example snippets
use License\Actions\IssueLicense;
use License\Models\LicenseStatus;
use License\Models\LicenseType;
$license = app(IssueLicense::class)->execute([
'product_id' => $product->id,
'edition_id' => $edition->id,
'license_type_id' => LicenseType::idFor(LicenseType::SUBSCRIPTION),
'license_status_id' => LicenseStatus::idFor(LicenseStatus::ACTIVE),
'name' => 'Acme Corp',
'max_devices' => 5,
'valid_from' => now(),
'valid_until' => now()->addYear(),
]);
$token = $license->plain_token; // signed JWT, returned once on creation