PHPackages                             roui/model-file-manager - 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. roui/model-file-manager

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

roui/model-file-manager
=======================

A Laravel package to handle file storage on model level

v1.0.0(1y ago)42MITPHPPHP ^8.3

Since Sep 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/MohammadaliMirhamed/ModelFileManager)[ Packagist](https://packagist.org/packages/roui/model-file-manager)[ RSS](/packages/roui-model-file-manager/feed)WikiDiscussions main Synced 1mo ago

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

Model File Manager Package
==========================

[](#model-file-manager-package)

Introduction
------------

[](#introduction)

The **ModelFileManager** package is a Laravel package designed to handle file storage at the model level. It provides features for uploading, deleting, and resizing files. Additionally, it supports multiple file collections and allows you to easily store and manage files such as images, documents, and more.

Requirements
------------

[](#requirements)

- **PHP:** 8.3 or higher
- **Laravel:** 8.x or higher
- **Intervention Image:** 2.x

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

[](#installation)

1. Install the package via Composer:

    ```
    composer require roui/model-file-manager
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --tag=config
    ```
3. Ensure the `Intervention Image` package is installed:

    ```
    composer require intervention/image
    ```

Configuration
-------------

[](#configuration)

After publishing the configuration, you will find the config file at `config/modelfilemanager.php`. You can customize the following settings:

- **storage\_disk**: The default storage disk to use.
- **resized\_image\_path**: The path for storing resized images.
- **default\_collection**: The default collection name for file uploads.

### Example of `config/modelfilemanager.php`:

[](#example-of-configmodelfilemanagerphp)

```
