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↑66.7%[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 yesterday

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 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

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

2407d ago

Major Versions

0.0.3 → v1.0.02019-03-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/2357415d73716a023601d0bc95812c5160ff977f17da9d43fbdc40b047a05c50?d=identicon)[nbourguig](/maintainers/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

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[spatie/laravel-backup-server

Backup multiple applications

17016.7k1](/packages/spatie-laravel-backup-server)[sopamo/laravel-filepond

Laravel backend module for filepond uploads

215272.2k3](/packages/sopamo-laravel-filepond)

PHPackages © 2026

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