Manage and provision TLS certificates for your domains from Laravel via pluggable providers.
roundly-consulting/certificates-for-laravel is a Laravel package for manage and provision tls certificates for your domains from laravel via pluggable providers..
It currently has 5 GitHub stars and 18 downloads on Packagist (latest version 1.1.3).
Install it with composer require roundly-consulting/certificates-for-laravel.
Discover more Laravel packages by roundly-consulting
or browse all Laravel packages to compare alternatives.
Last updated
Request, track and renew the TLS certificates for your domains directly from Laravel. Issue through Let's Encrypt (a native ACME client), cert-manager on Kubernetes or a filesystem, and keep every certificate's status and expiry in an Eloquent registry you can query, renew and monitor.
Requires PHP 8.4 (ext-openssl, ext-json) and Laravel 12 or 13.
composer require roundly-consulting/certificates-for-laravel
php artisan vendor:publish --tag="certificates-migrations"
php artisan migrate
If the models you attach certificates to have UUID/ULID keys, set CERTIFICATES_KEY_TYPE
before migrating. Pick the provider with CERTIFICATES_DRIVER: kubernetes (the default),
acme (your app must serve /.well-known/acme-challenge/{token} from the challenge disk) or
filesystem.
Request a certificate (one SAN certificate for both hosts) and attach it to its owner. On the
default kubernetes driver cert-manager issues it in the background:
use RoundlyConsulting\Certificates\Facades\Certificates;
$certificate = Certificates::for('shop.example.com')
->alsoFor('www.shop.example.com')
->owner($tenant) // a model using the HasCertificates trait
->issue();
$certificate->status; // CertificateStatus::Requested (acme, filesystem: Issued)
Schedule the sync that records the outcome and the renewal sweep, then read and manage the registry:
use Illuminate\Support\Facades\Schedule;
Schedule::command('certificates:sync')->everyFiveMinutes(); // Requested → Issued, fires CertificateIssued
Schedule::command('certificates:renew')->daily(); // everything inside renewal.threshold_days
Certificates::status('shop.example.com'); // CertificateStatus::Issued once synced
Certificates::find('shop.example.com')?->daysUntilExpiry(); // 90
Certificates::expiring(14); // Collection<int, Certificate>, soonest first
Certificates::revoke('shop.example.com', 'key compromise');
The full documentation — configuration, every feature and its API, and testing — lives on our website: roundly-consulting.com/open-source/docs/certificates-for-laravel
Release notes are in CHANGELOG.md. To contribute, see the contributing guide.
This package is free and open source, built and maintained by Roundly Consulting. If it saves you time, please consider supporting our open-source work — a one-time donation, a monthly pledge on Patreon or a crypto donation helps fund maintenance, new features and new packages.
The MIT License (MIT). See LICENSE.