NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages
Certificates for Laravel

Multi-tenant connections

Target a specific database connection per call with on(). It returns a connection-bound clone of CertificatesManager, leaving the singleton untouched, and every registry read and write through it — issue(), find(), status(), for(), renew(), renewDue(), revoke(), expire(), sync(), prune() — uses that connection:

Certificates::on('tenant')->for('app.tenant.example.com')->issue();
Certificates::on('tenant')->find('app.tenant.example.com');
Certificates::on('tenant')->issueIfMissing('app.tenant.example.com');
Certificates::on('tenant')->status('app.tenant.example.com');
Certificates::on('tenant')->renewDue();
Certificates::on('tenant')->prune(30);

Set an app-wide default with the connection config key (CERTIFICATES_DB_CONNECTION). The model falls back to it whenever no connection is set explicitly; null uses the model’s default connection.

Console

Every command accepts --connection=:

php artisan certificates:issue app.tenant.example.com --connection=tenant
php artisan certificates:list --connection=tenant
php artisan certificates:renew --connection=tenant
php artisan certificates:check --alert --connection=tenant
php artisan certificates:prune --connection=tenant
php artisan certificates:sync --driver=kubernetes --connection=tenant

Queued renewals keep their tenant: RenewCertificateJob carries the database connection the row was queued from (its databaseConnection property) and re-reads the row on it through the certificates.model class.

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.