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

Every event lives in RoundlyConsulting\Certificates\Events and carries the Eloquent registry model as $certificate. Listen to them instead of polling:

EventPayloadDispatched when
CertificateRequested$certificateThe registry row is upserted as requested, before provisioning.
CertificateIssued$certificateProvisioning succeeded and the row is issued.
CertificateFailed$certificate, string $reasonAn issuance or renewal failed — the provider threw, reported the certificate failed, expired or revoked, or a renewal returned the same certificate; the row is failed.
CertificateRenewed$certificateA renewal finished and the row is renewed.
CertificateExpiring$certificate, int $daysUntilExpiryCertificates::renewDue() (and so certificates:renew without a domain) and certificates:check, per certificate.
CertificateRevoked$certificate, ?string $reasonCertificates::revoke().
CertificateExpired$certificateCertificates::expire().
use Illuminate\Support\Facades\Event;
use RoundlyConsulting\Certificates\Events\CertificateExpiring;
use RoundlyConsulting\Certificates\Events\CertificateFailed;
use RoundlyConsulting\Certificates\Events\CertificateIssued;

Event::listen(function (CertificateIssued $event): void {
    logger()->info('issued', ['domain' => $event->certificate->domain]);
});

Event::listen(function (CertificateFailed $event): void {
    // $event->reason — the provider's error message
});

Event::listen(function (CertificateExpiring $event): void {
    // $event->daysUntilExpiry
});

CertificateFailed, CertificateRevoked and CertificateExpired also feed the built-in alert listener when alerts.enabled is true (see Expiry monitoring). Certificates::fake() does not dispatch events.

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.