PHPackages                             conceptbyte/time-traveller - 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. conceptbyte/time-traveller

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

conceptbyte/time-traveller
==========================

Time travelling for Laravel models.

v1.0.1(9y ago)34922[1 PRs](https://github.com/conceptbyte/time-traveller/pulls)MITPHPPHP &gt;=5.5.9

Since Sep 19Pushed 9y ago3 watchersCompare

[ Source](https://github.com/conceptbyte/time-traveller)[ Packagist](https://packagist.org/packages/conceptbyte/time-traveller)[ RSS](/packages/conceptbyte-time-traveller/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Laravel Time Traveller
----------------------

[](#laravel-time-traveller)

Time travelling for Laravel 5 models.

- Uses database table to store model states.
- Can be accessed from ORM or URL Query String.
- Bundled command to keep revisions table healthy.
- Ability to override Revisions model for extension.

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

[](#installation)

Run the following command on your project root. `composer require conceptbyte/time-traveller`

Add the service provider to the `config/app.php` file under the `providers` key. Make sure to add it after the default laravel service providers.

```
'providers' => [
    ...,
    'ConceptByte\TimeTraveller\TimeTravellerServiceProvider'
]
```

Publish Configuration
---------------------

[](#publish-configuration)

Run `php artisan vendor:publish` to publish the package configurations.

Modify Configuration
--------------------

[](#modify-configuration)

Use the `config/timetraveller.php` file to modify the package defaults.

- Revisions Model `'model' => ConceptByte\TimeTraveller\Models\Revision::class`
- Query String Parameter `'at' => 'at'`
- Clear audits that are older than `'clear' => '365'`

Usage
-----

[](#usage)

Enable time traveller on a model by using the trait.

```
class Post extents Model
{
    use TimeTravel;

    public function getBy()
    {
        return Auth::user()->name;
    }
}
```

All models that use the trait must implement `abstract public function getBy()` which returns any string. This function can be used to save any additional attributes such as the owner of the change.

\###Get the state of a record at a specific data/time.

```
Post::at('58781813')->find(1);
```

\###Get the state of a record using a query string.

URL: `timetravel.app/posts/1?at=58781813`

```
Post::find(1);
```

\###Get a model with revisions

```
Post::with('revisions')->first();
```

\###You can clear the audits table records that are older than a specified range. `php artisan time-traveller:clear`. This will read the config file and clear records that are older than the configured number of days.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~61 days

Total

5

Last Release

3645d ago

Major Versions

v0.1.2 → v1.0.02016-05-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d1b378098cc6e86d56dee9c2854fd422cca62bbcf38dc4289d31ac096d0ff3c?d=identicon)[rajdeeptarat](/maintainers/rajdeeptarat)

---

Top Contributors

[![rajdeeptarat](https://avatars.githubusercontent.com/u/1526442?v=4)](https://github.com/rajdeeptarat "rajdeeptarat (10 commits)")

---

Tags

audit-logseloquentlaravellaravel-modelsphprevisionstraveller

### Embed Badge

![Health badge](/badges/conceptbyte-time-traveller/health.svg)

```
[![Health](https://phpackages.com/badges/conceptbyte-time-traveller/health.svg)](https://phpackages.com/packages/conceptbyte-time-traveller)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[ryangjchandler/orbit

A flat-file database driver for Eloquent.

922256.2k5](/packages/ryangjchandler-orbit)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3593.5k](/packages/baril-bonsai)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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