PHP code example of laravel-ready / license-connector

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

    

laravel-ready / license-connector example snippets


use LaravelReady\LicenseConnector\Services\ConnectorService;

...

$licenseKey = '46fad906-bc51-435f-9929-db46cb4baf13';
$connectorService = new ConnectorService($licenseKey);

$isLicenseValid = $connectorService->validateLicense();

if ($isLicenseValid) {
    // License is valid
    echo 'License is valid';

    print_r($connectorService->license);
} else {
    // License is invalid
    echo 'License is not valid';
}

$customData = ['email' => '[email protected]'];
$isLicenseValid = $connectorService->validateLicense($customData);
bash
#publish configs

php artisan vendor:publish --tag=license-connector-configs