Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Encryptable Laravel Package

h-farm/laravel-encryptable

Transparently encrypt Eloquent model attributes at rest with a simple trait. Values are encrypted on save and decrypted on read, so your code keeps working with plain strings while the database stores only ciphertext. A drop-in Laravel package that's easy to configure.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for at-rest field encryption. This package turns "encrypt PII columns" from a custom engineering project into an afternoon of model-level configuration. It supports the decision to buy into the framework ecosystem rather than hand-rolling per-model crypto, which is where most homegrown encryption bugs (key handling, serialization, mixed plaintext/ciphertext rows) originate.
  • Compliance and privacy roadmap items. GDPR/CCPA data-minimization work, security questionnaires, and SOC 2 control narratives all ask the same question: "is sensitive data encrypted at rest at the application layer?" Encrypting individual attributes (not just the database volume) lets you answer yes and narrows blast radius from leaked backups, read replicas, and over-broad DBA access.
  • Scoping a "sensitive data" migration. The trait-based approach supports a phased rollout: identify high-risk columns (email, phone, government IDs, health notes), encrypt per model, and ship incrementally instead of a big-bang schema migration.
  • Platform upgrade planning. Release 4.1.0 adds Laravel 13 and PHP 8.5 support. That materially changes the roadmap conversation: if your organization plans to track Laravel 13 early, this dependency no longer blocks or delays that upgrade—previously it would have been a hard gate.
  • Third-party vs. first-party risk in the dependency review. A single-maintainer community package with a narrow scope is a reasonable risk profile for a well-bounded concern like attribute encryption; this assessment feeds the vendor/dependency review board.
  • Incident-response readiness. Knowing which columns are encrypted and how key rotation works informs the "we may have exposed data" runbook and determines whether a breach notification is scoped narrowly.

When to Consider This Package

Good fit when:

  • You need application-level encryption of specific model attributes, not whole-database encryption (which you should already have at the storage layer).
  • The sensitive fields are read/written through Eloquent rather than raw query builder or reporting SQL—trait-based encryption breaks down the moment queries, exports, or BI tools touch the raw columns directly.
  • You have a plausible key management story (KMS, secrets manager, environment-isolated keys) and, critically, a key rotation and backfill plan. Losing the encryption key loses the data—this is a product-continuity risk, not just an ops detail.
  • Your team is on, or actively tracking, recent Laravel versions; 4.1.0 explicitly covers Laravel 13 / PHP 8.5, so you're not pinned to an older framework to keep the dependency.
  • The encryption requirement is narrow and stable—a handful of PII columns with clear ownership.

Look elsewhere or think harder when:

  • You need searchable/filterable/sortable encrypted data at scale. Equality lookups typically require deterministic hashing or blind indexes, which leak some information; full-text search, range queries, and ORDER BY on encrypted columns are effectively off the table. If the product roadmap depends on those, this package changes the product, not just the schema.
  • You need high-assurance key management, envelope encryption, per-tenant keys, or audit trails out of the box. Expect to build key custody yourself, or evaluate a dedicated secrets/field-encryption service or a vault-backed solution instead.
  • You have analytics, data warehouse, or ML pipelines reading those columns. Encrypted attributes silently poison downstream models and dashboards; the data contract has to change deliberately.
  • Bus factor and support SLAs matter. This is a small, single-vendor community package. If you require a commercial support contract, a security review with vendor attestations, or guaranteed CVE response times, that's a real gap you'll need to accept explicitly.
  • The encryption need is actually a tokenization or masking requirement (e.g., support agents need to see a last-four). Masking/redaction is often the right product answer, and framing it as encryption can over-engineer the solution.

How to Pitch It (Stakeholders)

For executives (one paragraph): We evaluated a small open-source Laravel package that adds field-level encryption to our application models—so sensitive customer attributes stay unreadable in the database itself, not just on disk. This closes a recurring gap in security questionnaires and reduces the impact of a backup, replica, or insider-access incident. The cost is low: it's configuration rather than custom code, and the latest release (4.1.0) keeps us compatible with our planned Laravel 13 and PHP 8.5 upgrade path. The main conditions are operational—we must own key management and rotation—and product—encrypted fields can't be freely searched or reported on, so we'd scope it to a short list of high-risk attributes rather than applying it broadly.

For engineering: Treat this as a bounded, well-understood dependency for transparent attribute encryption on Eloquent models. 4.1.0 is a compatibility release—Laravel 13 and PHP 8.5 support, plus a CI dependency bump—with no API changes, so it's a safe minor upgrade and, importantly, removes a blocker on our framework upgrade. Before adopting we need written answers on three things: (1) key storage and rotation, including how existing rows get re-encrypted; (2) the blast radius on raw queries, exports, and any code that bypasses Eloquent; (3) which exact attributes qualify, given that encrypted columns lose search, sort, and range-query capability. Note the maintenance profile—single maintainer, community-supported—and decide consciously whether that's acceptable for a security-relevant path, or whether we want to wrap it behind our own interface so it stays swappable.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console