softartisan/laravel-vanguard
Laravel Vanguard gives your Laravel application a security-first foundation, bundling opinionated defaults and helpers for authentication, authorization, and safer request handling so you can ship robust features faster.
VANGUARD_TENANCY_DATABASE_MODE=single lets a PM support a shared-database SaaS model without forcing a database-per-tenant migration. It clarifies the product boundary (database backed up once at the landlord level; tenant backups cover files only) and avoids over-engineering tenancy for apps that do not need physical isolation.VANGUARD_ENCRYPTION_ENABLED) and dedicated backup/restore connections give concrete answers for security reviews, especially PostgreSQL Row-Level Security environments where a dump taken as the application role is incomplete. Encryption keys are supplied only at restore time, which supports key-management policies rather than embedding secrets in storage.VANGUARD_R2_*) and an S3-compatible disk abstraction allow a build-vs-buy decision on remote storage without writing custom adapters, and can reduce egress costs versus default S3 destinations.pg_dump/server major check (warn or strict) turns a silent backup-corruption risk into an explicit release or runbook decision. The health screen reporting both majors gives support and on-call teams a shared source of truth.Consider Vanguard when:
Look elsewhere when:
To executives: Vanguard v2.7 reduces compliance and operational risk without forcing a tenancy migration or a config rewrite. Encryption at rest, dedicated backup roles for RLS environments, and explicit failure modes instead of plaintext fallback give auditors and customers concrete answers. Cloudflare R2 support can lower storage egress costs, and the opt-in defaults mean no forced upgrade work for current deployments. This is a build-vs-buy decision that favors buying: the package now covers backup correctness, storage flexibility, and install drift reporting that would otherwise become internal tooling.
To engineering: The release is deliberately non-breaking for applications that use Vanguard directly: defaults preserve 2.6.1 behavior, no migration or config republish is required, and tests cover each default. The meaningful engineering choices are opt-in—dedicated connections for RLS-correct dumps, shared-database tenancy mode, age encryption, PostgreSQL version checks, and R2 disks. The only package-extender impact is the optional fourth parameter on BackupManager::createRecord() and the need for subclasses that write their own backups to call assertEncryptionReady() before dumping or archiving.
To security and compliance: Encrypted archives are opt-in, use age recipients, and never store the private key; restores require an operator-supplied identity file or stdin. Missing binaries or recipients fail before the dump, with no plaintext fallback, and encrypted backups are refused by the restore endpoint and job with a 400 that names the console command. The new authentication documentation clarifies that the dashboard requires a logged-in user by default while authorization remains in the application via Vanguard::auth(), with guidance for platform-operator-only access in multi-tenant deployments.
How can I help you explore Laravel packages today?