Download the PHP package dixieio/eloquent-model-future without Composer

On this page you can find all versions of the php package dixieio/eloquent-model-future. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eloquent-model-future

Eloquent Model Futures

Give your models a nice and predictable future

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

Installation

Require the package via composer

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

Schedule the command to persist future plans

Usage

On your desired models use the HasFuture trait.

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

Here is how you interact with your models future.


API Reference

Class#methodName Arguments Returns Note
Future#untilDate Carbon Eloquent\Builder Query only futures scheduled between date('now') and the given date. This is an Eloquent scope.
Future#uncommitted - Eloquent\Builder Query only uncommitted futures. This is an Eloquent scope.
Future#committed - Eloquent\Builder Query only committed futures. This is an Eloquent scope.
Future#futureable - MorphTo This is a standard Eloquent polymorphic relationship. (Inverse of HasFuture#futures)
FutureCollection#original - Model Gets the model back with no data changed.
FutureCollection#result - Model Gets the model back with all the future data filled. It is not saved
FutureCollection#resultDiff - Support\Collection Gets a list of all fields that would change, with both before and after
FuturePlanner#plan array FuturePlanner Set the attributes which should be persisted later.
FuturePlanner#for Carbon Future Set the date for when the attributes should be persisted.
FuturePlanner#see Carbon Model See the final result of a model for a given date.
FuturePlanner#getPlans - FutureCollection Get all future plans for a model.
FuturePlanner#getPlansFor Carbon FutureCollection Get all future plans for a model for the given day.
FuturePlanner#getPlansUntil Carbon FutureCollection Get all future plans for a model, between now and the given date.
FuturePlanner#hasAnyPlans - boolean See if model has any future plans at all.
FuturePlanner#hasAnyPlansFor Carbon boolean See if model has any future plans for the given date.
FuturePlanner#hasAnyPlansUntil Carbon boolean See if model has any future plans between now and the given date.
HasFuture#futures() - MorphMany This is a standard Eloquent polymorphic relationship
HasFuture#uncommittedFutures - MorphMany Same as futures but filtered to only include uncommitted futures
HasFuture#commit - boolean This is a wrapper around $model->save() but it also sets the committed flag to Carbon::now()
Future#forDate Carbon Eloquent\Builder Query only futures scheduled for the given day. This is an Eloquent scope.

All versions of eloquent-model-future with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version 5.5.*|5.6.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dixieio/eloquent-model-future contains the following files

Loading the files please wait ....