PHPackages                             jaysson/eloquent\_filefield - 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. jaysson/eloquent\_filefield

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

jaysson/eloquent\_filefield
===========================

Automatically save files assigned to eloquent model attributes

1.0.1(9y ago)41.8k1MITPHPPHP ~5.5|~7.0

Since Mar 25Pushed 6y agoCompare

[ Source](https://github.com/jaysson/eloquent_filefield)[ Packagist](https://packagist.org/packages/jaysson/eloquent_filefield)[ Docs](https://github.com/jaysson/eloquent_filefield)[ RSS](/packages/jaysson-eloquent-filefield/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Eloquent File Field
===================

[](#eloquent-file-field)

Easily upload files to a directory and save the filename to database attribute.

It does not handle any image processing. Take a look at \[Glide\]\[\] for that.

Install
-------

[](#install)

Via Composer

```
$ composer require jaysson/eloquent_filefield
```

Usage
-----

[](#usage)

In your Eloquent model:

```
use Jaysson\EloquentFileField\FileFieldTrait;

public $fileFields = [
  'image' => [],
  'poster' => [
  	'disk' => app('config')->get('filesystems.default'),
    'path' => 'uploads/:class_slug/:attribute/:unique_id-:file_name',
    'default_path' => 'uploads/default.png'
  ]
];
```

Each field can have filesystem disk, path pattern and default path options. If you don't specify any of them, they will be loaded from default config.

Publish default config
----------------------

[](#publish-default-config)

```
$ php artisan vendor:publish
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~169 days

Total

2

Last Release

3530d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4300b183fd4487347936645aba0294561c9a8dca9a5817a8d05502c7985147fc?d=identicon)[jaysson](/maintainers/jaysson)

---

Tags

file-systemlaraveluploadlaravelfileuploadjayssoneloquent\_filefield

### Embed Badge

![Health badge](/badges/jaysson-eloquent-filefield/health.svg)

```
[![Health](https://phpackages.com/badges/jaysson-eloquent-filefield/health.svg)](https://phpackages.com/packages/jaysson-eloquent-filefield)
```

###  Alternatives

[codesleeve/laravel-stapler

Easy file upload management for the Laravel Framework.

558413.9k11](/packages/codesleeve-laravel-stapler)[czim/laravel-paperclip

Laravel Eloquent file attachment solution

80802.1k6](/packages/czim-laravel-paperclip)[itskodinger/midia

Simple Media manager for your Laravel project

1415.8k](/packages/itskodinger-midia)

PHPackages © 2026

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