Licence checks, feature entitlements and safe updates for Laravel products sold through Faveo Invoicing.
| Two licence modes | Online (DATABASE): checks Faveo Invoicing every few days, with a grace period when the server can't reach it. Offline (FILE): a signed licence file locked to the server, never contacts Faveo Invoicing. |
| Entitlements | Features, limits (agents, departments…) and expiry dates, signed by Faveo Invoicing. |
| Safe updates | Signed archives or update files, backed up first and restored automatically if extraction fails. |
| Plugins | Separately installed add-ons with their own licence, updates and backups. No licence code inside the plugin. |
| Laravel integration | Facade, middleware, @licensed Blade directive, artisan commands and events. |
This package is the client side of Faveo Invoicing, the invoicing and subscription system that sells your product, issues licences and signs entitlements and updates. Faveo Invoicing writes the identity file and licence file into every download, and this package reads them. For installing and using Faveo Invoicing itself, see its README and the Faveo Invoicing Wiki.
What Faveo Invoicing must send for this package to work is in the Server protocol.
- PHP 8.2+
- Laravel 12 or 13
- PHP extensions:
curl,sodium,zip,json
The package is private. Point Composer at the repository, then require it:
"repositories": [{"type": "vcs", "url": "git@github.com:sadhasivam-ladybirdweb/faveo-license-client.git"}]composer require faveo/license-client
php artisan vendor:publish --tag=license-client-config # optional: config/license-client.php
php artisan migrate # creates the license_cache tableThe service provider registers itself. Publish tags: license-client-config, license-client-lang, license-client-migrations, or license-client for all three.
1. Configure the values every product needs. Use the same path as the product's config_file_path in Faveo Invoicing:
LICENSE_IDENTITY_FILE=storage/app/myproduct/product.json
LICENSE_SALT=a-long-random-string-never-change-itThe mode comes from the identity file Faveo Invoicing writes (DATABASE for online orders). Without an identity file, set LICENSE_MODE=DATABASE yourself, because the default is FILE. See Configuration.
2. Activate the licence. Online is the main path (online); for servers with no internet use the offline licence file, which also needs LICENSE_FILE (the product's license_file_path):
php artisan license:install LICENSE-CODE --email=owner@customer.com # online
php artisan license:import license.json # offline3. Protect your routes and features:
use Faveo\LicenseClient\Laravel\Facades\License;
Route::middleware('license')->group(function () {
Route::get('/reports', ReportsController::class)->middleware('license.feature:reports');
});
if (! License::withinLimit('agents', Agent::count() + 1)) {
// plan limit reached
}4. Check it works:
php artisan license:status --forceFaveo Integration Sample explains the Faveo Invoicing licence APIs and shows how to integrate them into a product.
- Guides: why a product needs licensing, how to configure it, how to call the licence functions in your product, and how updates work.
- API tester: enter the server URL, pick an API and send the request to see the reply.
This package already makes these API calls for you, so you don't need to code them yourself. Read the sample if you want to understand what is sent to Faveo Invoicing and what comes back.
| Guide | Read it to |
|---|---|
| Configuration | Set up the identity file, .env values and every config key |
| Online licensing | Run DATABASE mode: checks, grace period, upgrading from the old scripts |
| Offline licensing | Activate, renew and move a FILE mode licence |
| Using the licence | Facade, middleware, Blade, entitlements, Status, building a licence page |
| Plugins | Licence and update plugins separately from the product |
| Updates | Online and offline updates, rollback, running updates from code |
| Commands | Every artisan command and option |
| Events and messages | Listen to licence and update events, translate customer messages |
| Troubleshooting | Fix common errors |
| Server protocol | What Faveo Invoicing must send (for its developers) |
composer test # PHPStan, Pint, 100% type coverage, Pest
composer test:unit # Pest only
composer lint # fix code style
composer serve # Testbench workbench appSee CHANGELOG.
Contributions are welcome via pull requests. Please review the contributing guidelines first.
Please review our security policy on how to report security vulnerabilities.
For professional support or custom development, reach out via the Faveo contact form.
See LICENSE.md.