petrknap/eloquent
A collection of enhancements and helper classes for Laravel Eloquent: UTC/local datetime casts, Optional wrappers that delegate missing-model handling, and repositories that provide a clean, expressive interface for persistence logic.
Optionals area may inform decisions about tri-state fields—missing vs. explicitly null vs. set—useful in partial updates, imports, and API payloads. Validate the actual behavior before designing product semantics around it.Repositories helpers can inform internal architecture discussions, but Laravel teams should decide deliberately whether repository abstraction improves testability and domain boundaries or adds unnecessary indirection over Eloquent.AsPrivate should be inspected carefully. Do not assume it provides encryption, access control, or compliance-grade protection without code review and security testing.Consider it when:
Look elsewhere when:
Executive summary: This is a small, early-stage Eloquent helper package with useful patterns—especially around UTC/local datetime casting—but effectively no ecosystem validation. It is not a strategic dependency. The recommended position is “assess as a reference, do not adopt as a critical dependency.”
For engineering: Use it as a design input, not a default library. Spike the datetime and optional-value patterns, write internal tests, and decide whether an in-house utility is cheaper than owning a third-party dependency. If adopted, vendor or pin it, isolate it behind an internal interface, and document exit criteria.
For product: The real value is reducing timezone-related bugs and clarifying optional-field semantics. That value can be captured through an internal implementation without taking on single-maintainer, low-adoption, and LGPL-3.0 exposure.
Recommendation: Do not add to the critical path today. Revisit only if the package gains meaningful adoption, active maintainers, test/CI evidence, and a license review clears it for the intended distribution model.
How can I help you explore Laravel packages today?