PHPackages                             digbang/files - 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. digbang/files

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

digbang/files
=============

File handling library

v2.0.0(4y ago)011.4k↓50%1MITPHPPHP ^7.4 || ^8.0.2

Since Jan 9Pushed 4y ago35 watchersCompare

[ Source](https://github.com/digbang/files)[ Packagist](https://packagist.org/packages/digbang/files)[ RSS](/packages/digbang-files/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (8)Versions (7)Used By (0)

digbang/files
=============

[](#digbangfiles)

This library helps with the handling of files and images. The files are stored physically using Laravel's filesystem configuration; and logically into a table in the database.

Usage
-----

[](#usage)

### Mappings

[](#mappings)

`$builder->manyToOne(File::class, 'propertyName');``$builder->belongsTo(ImageFile::class, 'imagePropertyName');`

### Image Handling

[](#image-handling)

Each ImageFile has an optional parent image (the original one). This allows to have a tree of curated images attached to the original.

For example:

```
public function __construct(FileRepository $repository, ImageCurator $curator)
{
    $this->repository = $repository;
    $this->curator = $curator;
}

public function curateImage(ImageFile $originalImage): ImageFile
{
    if (! ($curatedImage = $originalImage->getCurated('SOME_IDENTIFICATION_KEY'))) {
        $originalImage->setContentGetter(function () use ($originalImage) {
            return $this->repository->getContents($originalImage->getId());
        });

        $curation = $this->curator
            ->resize(WIDTH, HEIGHT)
            ->interlace()
            ->optimize() //not yet implemented
            ->buildCuration();

        $curatedImage = $originalImage->curate('SOME_IDENTIFICATION_KEY', $curation);
        $curatedImage->setContentGetter(function () use ($curatedImage) {
            return $this->repository->getContents($curatedImage->getId());
        });

        $this->repository->persist($curatedImage);
    }

    return $curatedImage;
}
```

The imageCurator can be extended or replaced. Also, you can implement another curator alongside the pre-existing one and use both at the same time.

The only requirement is that the curator should return an array of callbacks that the Curation object can apply to the image.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~301 days

Recently: every ~190 days

Total

6

Last Release

1545d ago

Major Versions

v1.2.1 → v2.0.02022-02-23

PHP version history (3 changes)v1.0.0PHP &gt;=7.1.0

v1.2.0PHP ^7.2

v2.0.0PHP ^7.4 || ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0dfa821a53e1e0912cdd57436ce11ee812a2597a9ffbd60c47a3af47e948aac?d=identicon)[dpgover](/maintainers/dpgover)

![](https://www.gravatar.com/avatar/1cc6c8bdb5c60e8da7e28d288d415a4c1bc520c9fde83aa42110e260c9002cdc?d=identicon)[marianofilipoff](/maintainers/marianofilipoff)

---

Top Contributors

[![dpgover](https://avatars.githubusercontent.com/u/5347955?v=4)](https://github.com/dpgover "dpgover (8 commits)")[![sojeda](https://avatars.githubusercontent.com/u/17851841?v=4)](https://github.com/sojeda "sojeda (2 commits)")[![marianofilipoff](https://avatars.githubusercontent.com/u/17851999?v=4)](https://github.com/marianofilipoff "marianofilipoff (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/digbang-files/health.svg)

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

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[reshadman/file-secretary

Get rid of anything related to files in Laravel, This package handles all for you. Anything we mean.

1131.8k](/packages/reshadman-file-secretary)[farhanshares/laravel-mediaman

MediaMan - The most elegant &amp; powerful media management package for Laravel!

293.7k](/packages/farhanshares-laravel-mediaman)

PHPackages © 2026

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