PHPackages                             inmanturbo/instances - 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. inmanturbo/instances

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

inmanturbo/instances
====================

An eloquent store for laravel

v0.0.2(1y ago)010[2 PRs](https://github.com/inmanturbo/instances/pulls)MITPHPPHP ^8.2

Since Aug 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/inmanturbo/instances)[ Packagist](https://packagist.org/packages/inmanturbo/instances)[ Docs](https://github.com/inmanturbo/instances)[ RSS](/packages/inmanturbo-instances/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (15)Versions (5)Used By (0)

An single table store for storing eloquent model instances
==========================================================

[](#an-single-table-store-for-storing-eloquent-model-instances)

[![Latest Version on Packagist](https://camo.githubusercontent.com/de45c6cb6495ab0e732bfb11a6c1341079d43302e398fe9c5aa5664012d78fe2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6d616e747572626f2f696e7374616e6365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inmanturbo/instances)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5dc8e840d9b426bf0cb3eddda944215fb018454ae05c8fb8bc62241a17ee0fef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e6d616e747572626f2f696e7374616e6365732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/inmanturbo/instances/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b91e47a5796ab2a769cc522d716d5bb55d6bb25b8b46b46b6165e365fca50ecb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e6d616e747572626f2f696e7374616e6365732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/inmanturbo/instances/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c0d103f20b5ed0c1b43a89cec331d6a2113370a75d5dd15b6ba6b89ad4bc8663/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6d616e747572626f2f696e7374616e6365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inmanturbo/instances)

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

[](#installation)

You can install the package via composer:

```
composer require inmanturbo/instances
```

You can run the migrations with:

```
php artisan instances:migrate
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="instances-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="instances-config"
```

This is the contents of the published config file:

```
return [
    /*
     * Enable or disable the event listeners.
     */
    'enabled' => env('INSTANCES_ENABLED', true),

    /*
     * The model used to store instances.
     */
    'instance_model' => \Inmanturbo\Instances\Models\Instance::class,

    /*
     * The model used to store snapshots.
     */
    'snapshot_model' => \Inmanturbo\Instances\Models\InstanceSnapshot::class,

    /*
     * The number of days to keep instances.
     */
    'prune_after_days' => 365 * 1000000, // wouldn't delete this in a million years,

    /*
     * The table name used to store instances.
     *
     * Changing it is not supported at this time.
     *
     * It's here for reference and to be used by the `instances:migrate` command.
     */
    'instance_table' => 'instances',

    /*
     * The table name used to store snapshots.
     *
     * Changing it is not supported at this time.
     *
     * It's here for reference and to be used by the `instances:migrate` command.
     */

    'snapshot_table' => 'instance_snapshots',

    /*
     * These tables will be created when running the migration.
     *
     * They will be dropped when running `php artisan instances:migrate --fresh`.
     */
    'migration_tables' => [
        'instances',
        'instance_snapshots',
    ],
];
```

Usage
-----

[](#usage)

Work in progress. See [tests](https://github.com/inmanturbo/instances/tree/main/tests/Feature) for usage.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [inmanturbo](https://github.com/inmanturbo)
- [spatie/laravel-event-sourcing](https://github.com/spatie/laravel-event-sourcing)
- [spatie/laravel-deleted-models](https://github.com/spatie/laravel-deleted-models)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0261babef618b8fb3bfcea84376ed5e71e7169586eb8de63a6550c2e7ea653a6?d=identicon)[inmanturbo](/maintainers/inmanturbo)

---

Top Contributors

[![inmanturbo](https://avatars.githubusercontent.com/u/47095624?v=4)](https://github.com/inmanturbo "inmanturbo (54 commits)")

---

Tags

laravelinstancesinmanturbo

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/inmanturbo-instances/health.svg)

```
[![Health](https://phpackages.com/badges/inmanturbo-instances/health.svg)](https://phpackages.com/packages/inmanturbo-instances)
```

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-sql-commenter

Add comments to SQL queries made by Laravel

1931.4M1](/packages/spatie-laravel-sql-commenter)[spatie/laravel-deleted-models

Automatically copy deleted records to a separate table

409109.8k4](/packages/spatie-laravel-deleted-models)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

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