Documentation for larsasub v0.38.2.
On an older version? Your release notes ship with the package (CHANGELOG.md).
Installation
LarsaSub is distributed through the private composer repository on larsasub.eu. Access is tied to your license: you authenticate with your account e-mail and a license token from the customer portal.
Requirements
- PHP ^8.3
- A full Laravel application on ^12.11 | ^13.0 (the package uses framework services beyond the split Illuminate components)
- A LarsaSub license (pricing)
- Mollie API credentials (for payment processing)
Before you install
Billing runs on infrastructure, not only on code. Everything below has to be true before the first live payment; none of it is optional, and php artisan larsasub:doctor checks the ones it can see.
| Requirement | Why |
|---|---|
A publicly reachable HTTPS URL (APP_URL) |
Mollie calls your webhooks; a payment's final status arrives there and nowhere else. On localhost the status never lands and charges stay unpaid. |
| A queue worker | Notifications and listeners are queued. QUEUE_CONNECTION=sync is not supported: it runs mail inside the webhook request, so a slow mail server turns into a webhook timeout and a retried payment. larsasub:doctor warns for sync outside local and testing. |
Cron running schedule:run every minute |
Planning, executing, renewing and expiring all happen in scheduled commands. Without cron nothing is ever charged. See Scheduled commands. |
| Payment methods activated | Every seeded method starts inactive, deliberately: you choose what you accept. Until at least one is active, nobody can subscribe or pay. |
policies.admin_role set |
Empty means nobody is an admin: plan management and the operator dashboards deny everyone. |
notifications.sales set |
Empty means every payment-failure and cancellation alert is discarded silently. |
| Invoicing configured, if you invoice | invoicing.enabled ships off. Turning it on without seller VAT and address details produces invoices that are not valid ones; see Compliance. |
| Private composer credentials in CI | The package installs from the repository on larsasub.eu; a CI job without a license token cannot build. See COMPOSER_AUTH in step 2 below. |
1. Get your license token
After purchase you receive a license token by e-mail. You can create additional tokens and revoke old ones at any time under Licenses in the customer portal. A token's plain value is shown exactly once; store it in your secrets manager.
Create one token per environment (production, staging, CI): revoking one then never breaks the others. Token behavior, rotation and the update-window rules are covered in Licensing & repository.
2. Register the repository
In your application root:
composer config repositories.peters-development composer https://larsasub.eu
composer config http-basic.larsasub.eu you@company.com YOUR-LICENSE-TOKEN
This writes the credentials to auth.json. Add auth.json to .gitignore. In CI, provide the credentials via the COMPOSER_AUTH environment variable instead:
COMPOSER_AUTH='{"http-basic":{"larsasub.eu":{"username":"you@company.com","password":"YOUR-LICENSE-TOKEN"}}}'
3. Install the package
composer require peters-development/larsasub
php artisan larsasub:install
larsasub:install publishes the config and the built dashboard assets, runs the migrations and seeds the payment methods, all of them inactive until you activate the ones you accept.
4. Declare your tier
Your license tier is a value you set yourself, in .env:
LARSASUB_LICENSE_TIER=single # single (default), unlimited or platform
Mollie Connect requires platform: with connect.enabled on and any other tier, the package refuses to boot. Nothing is verified or sent anywhere. php artisan larsasub:license shows the tier this installation declares and whether the enabled features fit it. On a cached configuration, run php artisan config:clear after changing the value. The details are on Licensing & repository.
Continue with the quick start to make your first model billable.
Admin companions (optional, included)
License holders can also install the admin companions from the same repository, at no extra cost. Pick the one that matches the admin panel you already run:
composer require peters-development/larsasub-nova # Laravel Nova 4.35+ or 5
composer require peters-development/larsasub-filament # Filament 5.7+
The Filament companion is a panel plugin — register it on the panel that manages billing:
use PetersDevelopment\LarsaSub\Filament\LarsaSubPlugin;
$panel->plugins([LarsaSubPlugin::make()]);
What each companion adds, and its requirements: Nova integration and Filament integration.
How licensing affects updates
composer update serves every version released during your license period. After your license expires those versions remain installable, on fresh servers and in CI; you only stop receiving newer releases until you renew. The full rules, including token rotation and expiry semantics, are on Licensing & repository.
Troubleshooting
- 401 on install: the token was revoked or mistyped, or the e-mail doesn't match the account that owns the license. Check both in the portal. After rotating a token, remember that CI secrets and every server's
auth.jsonneed the new value too. - Version not found: the release was published after your license expired. Either pin an older version or renew.