PHPackages                             laravel-enso/documentsmanager - 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. laravel-enso/documentsmanager

Abandoned → [laravel-enso/documents](/?search=laravel-enso%2Fdocuments)Plugin[File &amp; Storage](/categories/file-storage)

laravel-enso/documentsmanager
=============================

Documents Manager for Laravel Enso

5.4.6(2mo ago)2016.8k142MITPHP

Since Mar 20Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/laravel-enso/documents)[ Packagist](https://packagist.org/packages/laravel-enso/documentsmanager)[ Docs](https://github.com/laravel-enso/documents)[ RSS](/packages/laravel-enso-documentsmanager/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (15)Versions (232)Used By (2)

Documents
=========

[](#documents)

[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Stable](https://camo.githubusercontent.com/fe112471cdac9f1b173205ffadf185501f828efa435e3ad3b3df69d0ce028c1f/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f646f63756d656e74732f76657273696f6e)](https://packagist.org/packages/laravel-enso/documents)[![Downloads](https://camo.githubusercontent.com/1febe5fc317cd054b437e72063d0eb56e3dbe96d87f38b71f68a9d3e286de1f9/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f646f63756d656e74732f646f776e6c6f616473)](https://packagist.org/packages/laravel-enso/documents)[![PHP](https://camo.githubusercontent.com/da7cf113b588d26fe679dfefe4a15009272ed358ad4e786ad3c78b45faa61d69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d3737376262342e737667)](composer.json)[![Issues](https://camo.githubusercontent.com/242e28ca439cd7f581edcc4caaa598f0a55872eb145ddc5f436feb93ce8ac2ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c61726176656c2d656e736f2f646f63756d656e74732e737667)](https://github.com/laravel-enso/documents/issues)[![Merge Requests](https://camo.githubusercontent.com/c6d7cdc24358f1e492e20d4257ac593258aed68be44212bdfa6d90788f0c210f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c61726176656c2d656e736f2f646f63756d656e74732e737667)](https://github.com/laravel-enso/documents/pulls)

Description
-----------

[](#description)

Documents adds polymorphic document attachments to Enso models.

The package stores uploaded documents through the Enso files layer, exposes document listing, upload, and delete endpoints, supports configurable deletion rules for related models, and can queue OCR for PDF documents whose owners implement the `Ocrable` contract.

It is meant for backoffice models that need a lightweight document vault with optional OCR processing.

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

[](#installation)

Install the package:

```
composer require laravel-enso/documents
```

Run the package migrations:

```
php artisan migrate
```

Optional publish:

```
php artisan vendor:publish --tag=documents-config
```

Default configuration:

```
return [
    'deletableTimeLimit' => 60 * 60,
    'imageWidth' => 2048,
    'imageHeight' => 2048,
    'onDelete' => 'restrict',
    'loggableMorph' => [
        'documentable' => [],
    ],
    'queues' => [
        'ocr' => 'heavy',
    ],
];
```

Features
--------

[](#features)

- Polymorphic one-to-one and one-to-many document relations via the `Documentable` trait.
- File attachment handling through `laravel-enso/files`.
- Upload, list, and delete API under `core.documents`.
- Configurable delete policy with `restrict` or `cascade`.
- OCR dispatch for PDF documents whose owner implements `Ocrable`.

Usage
-----

[](#usage)

Add the trait to any model that should own documents:

```
use Illuminate\Database\Eloquent\Model;
use LaravelEnso\Documents\Traits\Documentable;

class Order extends Model
{
    use Documentable;
}
```

Available relations:

- `document()`
- `documents()`

If the owning model should trigger OCR for uploaded PDFs, implement `LaravelEnso\Documents\Contracts\Ocrable`.

API
---

[](#api)

### HTTP routes

[](#http-routes)

- `GET api/core/documents`
- `POST api/core/documents`
- `DELETE api/core/documents/{document}`

Route names:

- `core.documents.index`
- `core.documents.store`
- `core.documents.destroy`

### Model surface

[](#model-surface)

`LaravelEnso\\Documents\\Models\\Document`

Useful methods:

- `store(array $request, array $files)`
- `scopeFor(array $params): Builder`
- `scopeFilter(?string $search): Builder`

Depends On
----------

[](#depends-on)

Required Enso packages:

- [`laravel-enso/core`](https://docs.laravel-enso.com/backend/core.html) [↗](https://github.com/laravel-enso/core)
- [`laravel-enso/files`](https://docs.laravel-enso.com/backend/files.html) [↗](https://github.com/laravel-enso/files)
- [`laravel-enso/helpers`](https://docs.laravel-enso.com/backend/helpers.html) [↗](https://github.com/laravel-enso/helpers)
- [`laravel-enso/image-transformer`](https://docs.laravel-enso.com/backend/image-transformer.html) [↗](https://github.com/laravel-enso/image-transformer)
- [`laravel-enso/migrator`](https://docs.laravel-enso.com/backend/migrator.html) [↗](https://github.com/laravel-enso/migrator)
- [`laravel-enso/ocr`](https://docs.laravel-enso.com/backend/ocr.html) [↗](https://git.xtelecom.ro/laravel-enso/ocr)
- [`laravel-enso/track-who`](https://docs.laravel-enso.com/backend/track-who.html) [↗](https://github.com/laravel-enso/track-who)
- [`laravel-enso/users`](https://docs.laravel-enso.com/backend/users.html) [↗](https://github.com/laravel-enso/users)

Companion frontend package:

- [`@enso-ui/documents`](https://docs.laravel-enso.com/frontend/documents.html) [↗](https://github.com/enso-ui/documents)

Contributions
-------------

[](#contributions)

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 72.3% 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 ~15 days

Recently: every ~2 days

Total

220

Last Release

69d ago

Major Versions

1.3.2 → 2.1.222018-02-13

1.3.4 → 2.1.242018-03-05

2.4.20 → 3.0.02019-03-08

3.4.7 → 4.0.02020-06-25

4.1.3 → 5.0.02022-02-24

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4

1.1.15PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16073274?v=4)[Adrian Ocneanu](/maintainers/aocneanu)[@aocneanu](https://github.com/aocneanu)

---

Top Contributors

[![aocneanu](https://avatars.githubusercontent.com/u/16073274?v=4)](https://github.com/aocneanu "aocneanu (248 commits)")[![gandesc](https://avatars.githubusercontent.com/u/14071925?v=4)](https://github.com/gandesc "gandesc (56 commits)")[![vmcvlad](https://avatars.githubusercontent.com/u/37445394?v=4)](https://github.com/vmcvlad "vmcvlad (14 commits)")[![raftx24](https://avatars.githubusercontent.com/u/10864136?v=4)](https://github.com/raftx24 "raftx24 (7 commits)")[![DevIonut](https://avatars.githubusercontent.com/u/19207797?v=4)](https://github.com/DevIonut "DevIonut (6 commits)")[![GITmanuela](https://avatars.githubusercontent.com/u/44998004?v=4)](https://github.com/GITmanuela "GITmanuela (4 commits)")[![AbdullahiAbdulkabir](https://avatars.githubusercontent.com/u/33360580?v=4)](https://github.com/AbdullahiAbdulkabir "AbdullahiAbdulkabir (3 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")[![jlsjonas](https://avatars.githubusercontent.com/u/932193?v=4)](https://github.com/jlsjonas "jlsjonas (1 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

documentabledocuments-managerlaravellaravel-ensolaravel-packagevue-componentsdocumentslaravel-ensofile-uploaderdocuments-manager

### Embed Badge

![Health badge](/badges/laravel-enso-documentsmanager/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-enso-documentsmanager/health.svg)](https://phpackages.com/packages/laravel-enso-documentsmanager)
```

###  Alternatives

[laravel-enso/documents

Documents Manager for Laravel Enso

2040.7k1](/packages/laravel-enso-documents)[laravel-enso/localisation

Language and translation management for Laravel Enso

1362.3k11](/packages/laravel-enso-localisation)[laravel-enso/data-import

Excel Importer dependency for Laravel Enso

2043.6k6](/packages/laravel-enso-data-import)[laravel-enso/files

File management backend for Laravel Enso

1644.5k37](/packages/laravel-enso-files)[laravel-enso/core

The backend shell of a Laravel Enso application

3464.9k201](/packages/laravel-enso-core)[laravel-enso/logs

Application log management for Laravel Enso

1143.3k9](/packages/laravel-enso-logs)

PHPackages © 2026

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