PHPackages                             dixieio/eloquent-model-future - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dixieio/eloquent-model-future

ActiveLibrary[Database &amp; ORM](/categories/database)

dixieio/eloquent-model-future
=============================

Schedule changes for Eloquent models

v0.4.0(8y ago)7432[2 issues](https://github.com/dixieio/eloquent-model-future/issues)GPL-3.0-or-laterPHPPHP &gt;=7.0.0

Since Nov 11Pushed 8y ago3 watchersCompare

[ Source](https://github.com/dixieio/eloquent-model-future)[ Packagist](https://packagist.org/packages/dixieio/eloquent-model-future)[ RSS](/packages/dixieio-eloquent-model-future/feed)WikiDiscussions dev Synced 2w ago

READMEChangelog (3)Dependencies (3)Versions (11)Used By (0)

Eloquent Model Futures
======================

[](#eloquent-model-futures)

Give your models a nice and predictable future
----------------------------------------------

[](#give-your-models-a-nice-and-predictable-future)

A package that lets you plan changes to your models in a simple manner.

Installation
------------

[](#installation)

Require the package via composer

```
composer require dixie/eloquent-model-future
```

Run the package migrations to create a `futures` table, that will hold every future of your selected models.

```
php artisan migrate
```

Schedule the command to persist future plans

```
$scheduler->command('future:schedule')->daily();
```

Usage
-----

[](#usage)

On your desired models use the `HasFuture` trait.

```
class User extends Model
{
    use Dixie\EloquentModelFuture\HasFuture;
}
```

Now you can plan out, edit and take away attribute changes, planned for the future.

Here is how you interact with your models future.

```
$user = User::find(1);
$nextMonth = Carbon\Carbon::now()->addMonth();

// Plan a profile change for new years eve
$user->future()->plan([
    'bio' => 'Happy developer time. Wooh!',
    'mood' => 'excited',
])->for($nextMonth);

// Does our user have any scheduled plans for next month?
$user->future()->anyPlansFor($nextMonth); // true

// How does our user look in the future
$user->future()->see($newYearsEve);
User {
  'attributes': {
      'id': 1,
      'name': 'John Doe',
      'bio': 'Happy developer time. Wooh!',
      'mood': 'excited',
      [...]
  }
}

// You can commit to the changes by future plans after you've seen them
// ... this will fill the `committed` column with todays date
$user->future()->see($newYearsEve)->commit(); // true

// Access all future plans for the given day
$futurePlans = $user->future()->getPlansFor(Carbon $date)
FutureCollection {
    Future {
        'attributes' => [
            'bio' => 'Happy [...]',
            'mood' => 'excited',
        ]
    }
}

// There are some helper methods that come with the FutureCollection
$futurePlans->original();   // Original user state. Returns a user instance.

$futurePlans->result();     // How the user will look when collection is applied to user.
$futurePlans->resultDiff()  // Shows which attributes has changed
                            // and what the values would be before and after
```

---

API Reference
-------------

[](#api-reference)

**Class**\#*methodName*ArgumentsReturnsNote**Future**\#*untilDate*CarbonEloquent\\BuilderQuery only futures scheduled between `date('now')` and the given date. This is an Eloquent scope.**Future**\#*uncommitted*-Eloquent\\BuilderQuery only uncommitted futures. This is an Eloquent scope.**Future**\#*committed*-Eloquent\\BuilderQuery only committed futures. This is an Eloquent scope.**Future**\#*futureable*-MorphToThis is a standard Eloquent polymorphic relationship. *(Inverse of HasFuture#futures)***FutureCollection**\#*original*-ModelGets the model back with no data changed.**FutureCollection**\#*result*-ModelGets the model back with all the future data filled. **It is not saved****FutureCollection**\#*resultDiff*-Support\\CollectionGets a list of all fields that would change, with both *before* and *after***FuturePlanner**\#*plan*arrayFuturePlannerSet the attributes which should be persisted later.**FuturePlanner**\#*for*CarbonFutureSet the date for when the attributes should be persisted.**FuturePlanner**\#*see*CarbonModelSee the final result of a model for a given date.**FuturePlanner**\#*getPlans*-FutureCollectionGet all future plans for a model.**FuturePlanner**\#*getPlansFor*CarbonFutureCollectionGet all future plans for a model for the given day.**FuturePlanner**\#*getPlansUntil*CarbonFutureCollectionGet all future plans for a model, between now and the given date.**FuturePlanner**\#*hasAnyPlans*-booleanSee if model has any future plans at all.**FuturePlanner**\#*hasAnyPlansFor*CarbonbooleanSee if model has any future plans for the given date.**FuturePlanner**\#*hasAnyPlansUntil*CarbonbooleanSee if model has any future plans between now and the given date.**HasFuture**\#*futures*()-MorphManyThis is a standard Eloquent polymorphic relationship**HasFuture**\#*uncommittedFutures*-MorphManySame as `futures` but filtered to only include uncommitted futures**HasFuture**\#*commit*-booleanThis is a wrapper around `$model->save()` but it also sets the `committed` flag to `Carbon::now()`**Future**\#*forDate*CarbonEloquent\\BuilderQuery only futures scheduled for the given day. This is an Eloquent scope.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~116 days

Total

9

Last Release

3050d ago

PHP version history (2 changes)v0.1.0PHP ^5.6|^7.0|^7.1

v0.4.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/579824?v=4)[Ronni Egeriis Persson](/maintainers/egeriis)[@egeriis](https://github.com/egeriis)

---

Top Contributors

[![jstoone](https://avatars.githubusercontent.com/u/1711456?v=4)](https://github.com/jstoone "jstoone (70 commits)")[![egeriis](https://avatars.githubusercontent.com/u/579824?v=4)](https://github.com/egeriis "egeriis (10 commits)")

---

Tags

eloquentlaravelplanning

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dixieio-eloquent-model-future/health.svg)

```
[![Health](https://phpackages.com/badges/dixieio-eloquent-model-future/health.svg)](https://phpackages.com/packages/dixieio-eloquent-model-future)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11222.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[mozex/laravel-scout-bulk-actions

Import, flush, and queue-import all your Laravel Scout searchable models at once. Auto-discovers models, runs in bulk, tracks progress.

1437.7k](/packages/mozex-laravel-scout-bulk-actions)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
