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.9k↑42.9%1MITPHPPHP ^7.4 || ^8.0.2CI failing

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 yesterday

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

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

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

1591d 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://avatars.githubusercontent.com/u/5347955?v=4)[Dario Govergun](/maintainers/dpgover)[@dpgover](https://github.com/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.7M57](/packages/google-cloud)[unisharp/laravel-filemanager

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

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

Cloud Storage Client for PHP

34499.5M157](/packages/google-cloud-storage)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

135.2k1](/packages/markocupic-calendar-event-booking-bundle)[mmes-design/filament-file-manager

A beautiful file manager plugin for Filament. Browse, upload, rename, move and delete files with ease.

163.1k](/packages/mmes-design-filament-file-manager)

PHPackages © 2026

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