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

Eloquent Model Future Laravel Package

dixieio/eloquent-model-future

A Laravel Eloquent extension for scheduling model changes and handling future-dated attributes, so records can transition to new values automatically over time without extra jobs or manual updates.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by locating the package’s registered Artisan command backed by CommitToFutureCommand; run php artisan list and the command’s --help output to confirm the exact command name and option signatures in your app. If the package publishes config or migrations, publish them first and review the model/table that stores future-dated or uncommitted records.

The first practical use case is catching up after a scheduler outage or deployment: run the commit command with untillDate to commit every uncommitted date from the beginning of time through a cutoff. After upgrading to v0.3.0, treat untillDate as the command’s primary catch-up option and verify that any existing automation no longer depends on the command using forDate.

php artisan list
php artisan <commit-command> --help

Implementation Patterns

Use untillDate for backfills, scheduler recovery, and “commit everything pending up to today” workflows. Use forDate for targeted, single-date operations outside the command—for example, when a specific date needs to be committed independently of the backlog. This separation keeps bulk catch-up jobs predictable and avoids accidentally changing the command’s date scope.

In scheduled jobs, prefer untillDate as the default option so missed runs are recovered automatically. Log the resolved cutoff, number of dates committed, and any skipped/uncommitted records. For large backlogs, run the command on a staging copy first and consider chunking or batching around the package’s underlying date/commit API if the command processes many dates in one pass.

Wrap command invocations in tests that cover the boundary date, timezone handling, and idempotency. A safe pattern is to assert that running the command twice with the same untillDate does not duplicate committed records.

Artisan::call('<commit-command>', [
    '--untillDate' => now()->toDateString(),
]);

When integrating with application code, keep date parsing centralized—Carbon instances, app timezone, and storage timezone should be consistent between your calls and the package’s command. If the package exposes lower-level services or actions behind the command, prefer those in domain code and reserve the Artisan command for operational workflows.

Gotchas and Tips

v0.3.0 changes command behavior: CommitToFutureCommand now uses untillDate rather than forDate. Any script, cron entry, or deployment step that relied on the command’s previous forDate semantics should be updated and regression-tested.

untillDate now includes all uncommitted dates since the beginning of time. That is useful for recovery, but it can produce a large first run on an existing database. Run it against a copy, inspect the volume, and only then run it in production.

The option is spelled untillDate with two ls. Do not “correct” it to untilDate in scripts or config; use the package’s exact option name.

Debug by running the command’s --help, checking the command class for option definitions, and adding temporary logging around the cutoff and committed count. If results look wrong, verify timezone conversion and whether dates are considered “uncommitted” based on the package’s persistence rules. For extension, subclass or decorate the command only after confirming the package does not already expose a service/action for the same commit operation.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums