PHPackages                             elseoclub/modelfiler - 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. elseoclub/modelfiler

ActiveLibrary

elseoclub/modelfiler
====================

Add files handler to any model

3.0.0(1y ago)018MITPHPPHP ^8.0

Since Oct 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ElSeoClub/Modelfiler)[ Packagist](https://packagist.org/packages/elseoclub/modelfiler)[ RSS](/packages/elseoclub-modelfiler/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

Modelfiler Package
==================

[](#modelfiler-package)

The Modelfiler package allows you to easily manage file uploads associated with any Eloquent model in Laravel. This package supports polymorphic relationships and provides flexible configuration options for file types.

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

[](#installation)

To install the Modelfiler package, you can include it in your `composer.json` or run:

```
composer require elseoclub/modelfiler
```

```
php artisan migrate
```

Usage
-----

[](#usage)

### 1. Set Up Your Model

[](#1-set-up-your-model)

To use the Modelfiler package, you need to add the `WithModelFiler` trait to your model. For example, if you want to use it in the `User` model:

```
