PHPackages                             tequilarapido/diskstore - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. tequilarapido/diskstore

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tequilarapido/diskstore
=======================

v1.0.3(6y ago)01.7k↑25%[1 PRs](https://github.com/tequilarapido/diskstore/pulls)MITPHPPHP &gt;=7.1.3

Since Mar 13Pushed 5y ago3 watchersCompare

[ Source](https://github.com/tequilarapido/diskstore)[ Packagist](https://packagist.org/packages/tequilarapido/diskstore)[ Docs](https://github.com/tequilarapido/diskstore)[ RSS](/packages/tequilarapido-diskstore/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

tequilrapido/diskstore
======================

[](#tequilrapidodiskstore)

This packages help with storing data to disk. This comes handy if persisting data in a database is not the best solution. (ie, Data size etc ...)

Storing entities to disks.

Install
-------

[](#install)

```
composer require "tequilarapido/diskstore:^1.0.0"

```

Usage
-----

[](#usage)

- define a disk where entities will be stored in `config/filesystem.php`

```
    'disks' => [

        // ...

        'tweets' => ['driver' => 'local', 'root' => storage_path('/documents/locations')],

        // ...
     ],
```

- define your entity extending `StorableObject`. Every public property will be serialized and saved.

```

class FollowerLocation extends StorableObject
{
    public $twitter_id;

    public $location;

    /** This identifies the entity. And must be unique */
    public static function keyName()
    {
        return 'twitter_id';
    }

    /** Defines the disk that wil be used for storage **/
    public static function diskName()
    {
        return 'locations';
    }

    public function setLocation($location) {
        $this->location = $location;

        return $this;
    }

    // ...
}

```

- Check if an entity is persisted to disk :

```
 if(FollowerLocation::exists($twitter_id)) {
   //...
 }
```

- Save entity :

```
FollowerLocation::fromArray([
    'twitter_id' => $follower->twitter_id,
    'location' => $location,
])->store();
```

- Work with an empty entity with a specific uid :

```
FollowerLocation::for($twitter_id)->setLocation($location)->store();
```

- Find an entity by its unique id

```
    FollowerLocation::find($follower->twitter_id);
```

- Find an entity by its unique id or create/store on if none

```
    FollowerLocation::findOrNew($twitter_id)->setLocation($location)->store();
```

- Customize what will be serialized by overriding the `toArray` method

```
class FollowerLocation extends StorableObject
{
    // ...

    public function toArray() {
       return [
            'twitter_id' => '@requried! (uid)',
            // ...
       ];
    }
}
```

- Get stored entity full path file :

```
 $path  = FollowerLocation::path()

``

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~96 days

Total

7

Last Release

2455d ago

Major Versions

0.0.3 → v1.0.02019-03-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/276832?v=4)[Nassif Bourguig](/maintainers/nbourguig)[@nbourguig](https://github.com/nbourguig)

---

Top Contributors

[![nbourguig](https://avatars.githubusercontent.com/u/276832?v=4)](https://github.com/nbourguig "nbourguig (24 commits)")[![tr-github](https://avatars.githubusercontent.com/u/696870?v=4)](https://github.com/tr-github "tr-github (6 commits)")

### Embed Badge

![Health badge](/badges/tequilarapido-diskstore/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/filesystem

The Illuminate Filesystem package.

15263.8M3.1k](/packages/illuminate-filesystem)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

721160.4k12](/packages/tallstackui-tallstackui)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M267](/packages/illuminate-pipeline)

PHPackages © 2026

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