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 Expirable Laravel Package

alajusticia/laravel-expirable

Laravel Expirable lets you make any Eloquent model expirable with a simple trait. Add expiration timestamps, query scopes for active or expired records, and helper methods to expire or restore entries, making time-limited data like trials, posts, or tokens easy to manage.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for expiration/TTL behavior: If the product needs records, tokens, subscriptions, invites, trials, or similar entities to expire reliably, this package can reduce custom lifecycle code and the associated edge cases.
  • Roadmap confidence for typed Laravel codebases: v2.6.0 improves PHPStan support, which lowers the cost of adopting and maintaining the package in CI-enforced, statically analyzed codebases.
  • Engineering velocity and defect prevention: The new PHPStan extension preserves model and custom builder types for expiration scopes, and fixes date parameters, return values, fluent methods, IDs, and schema macros. This reduces type-related friction and catches integration mistakes earlier.
  • Low-risk adoption decision: No breaking changes are called out in v2.6.0. The release is primarily developer-experience and correctness tooling, so it is more of a maintenance/quality upgrade than a product-surface change.

When to Consider This Package

  • Consider it when the product domain has a clear expiration model and the team wants Laravel-native scopes, schema macros, and query helpers rather than bespoke expiration logic.
  • Strong fit when the engineering team uses PHPStan in CI and values typed model/builder behavior across custom scopes, relationships, and fluent query chains.
  • Consider it when reducing runtime defects in expiration queries matters more than building and maintaining internal expiration abstractions.
  • Look elsewhere if expiration is not a real domain concern, the team does not use static analysis, the project is not Laravel/PHP, or the package’s expiration semantics do not match the product’s required lifecycle rules.
  • Reassess if future releases introduce breaking schema/query changes, since expiration logic often sits close to critical data-retention and access-control behavior.

How to Pitch It (Stakeholders)

  • To executives: This is a low-risk quality release for a Laravel package that helps manage expiring data. It improves developer tooling and type safety, reducing the chance of expiration-related bugs without adding user-facing complexity.
  • To engineering: v2.6.0 adds an automatically registered PHPStan extension for expirable models and queries, preserves model and builder types across withExpired(), onlyExpired(), onlyEternal(), and expiredSince(), and fixes several type definitions including date parameters, fluent returns, key IDs, and schema macros. Regression tests were added for builders and relationships.
  • PM recommendation: Treat this as an adoption/maintenance enabler rather than a headline feature. Use it to justify standardizing expiration behavior in Laravel services where static analysis is part of the quality bar, and avoid positioning it as a customer-facing differentiator.
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