PHPackages                             leromo/laravel-filemanager - 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. leromo/laravel-filemanager

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

leromo/laravel-filemanager
==========================

File Manager for Laravel

v1.0.0(8mo ago)06MITPHPPHP ^8.2CI passing

Since Aug 15Pushed 8mo agoCompare

[ Source](https://github.com/Leromo-Dev/laravel-filemanager)[ Packagist](https://packagist.org/packages/leromo/laravel-filemanager)[ RSS](/packages/leromo-laravel-filemanager/feed)WikiDiscussions main Synced 1mo ago

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

File Manager for Laravel
========================

[](#file-manager-for-laravel)

[![PHP Composer](https://github.com/Leromo-Dev/laravel-filemanager/actions/workflows/php.yml/badge.svg)](https://github.com/Leromo-Dev/laravel-filemanager/actions/workflows/php.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/720a4d26091637981569a2f7c678588d775c37303f93e072ac67ac12d48cd868/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65726f6d6f2f6c61726176656c2d66696c656d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/leromo/laravel-filemanager)[![Total Downloads](https://camo.githubusercontent.com/4cedaf475e46aa9a9b301e4a40f5622657d81f90576ad10e97dca5d5d699171e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65726f6d6f2f6c61726176656c2d66696c656d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/leromo/laravel-filemanager)

Manage Files, Images, Docs with Eloquent models.

Getting Started
---------------

[](#getting-started)

### 1. Install

[](#1-install)

Run the following command:

```
composer require leromo/laravel-filemanager
```

### 2. Publish

[](#2-publish)

Publish config file.

```
php artisan vendor:publish --provider="Leromo\FileManager\FileManagerServiceProvider" --tag=filemanager-config
```

### 3. Preparing the database

[](#3-preparing-the-database)

You need to publish the migration to create the file table:

```
php artisan vendor:publish --provider="Leromo\FileManager\FileManagerServiceProvider" --tag=filemanager-migration
```

After that, you need to run migrations.

```
php artisan migrate
```

Usage
-----

[](#usage)

Your Eloquent models should use the `Leromo\FileManager\Traits\HasFile` trait.

Use blade component to add file uploader in your form.

```

```

For display old image in edit page.

```

```

Upload
------

[](#upload)

```
$model = Model::find(1);
$model->handleFileFromRequest()->toFileCollection();
```

If your file input name is not `image` then define second param.

```
$model->handleFileFromRequest('banner')->toFileCollection();
```

Upload to specific collection.

```
$model->handleFileFromRequest()->toFileCollection('images');
```

You can define default collection at eloquent level. Add below function in your model.

```
public function defaultCollection(): string
{
    return 'promo_images';
}
```

Upload to specific disk.

```
$model->handleFileFromRequest()->useDisk('s3')->toFileCollection();
```

### Register File Conversions

[](#register-file-conversions)

```
public function registerFileConversions()
{
    $this->addFileConversion('promo_image')
        ->width(420)
        ->height(350);
}
```

You can register as many file conversions as you want

```
public function registerFileConversions()
{
    $this->addFileConversion('promo_image')
        ->width(420)
        ->height(350);

    $this->addFileConversion('banner')
        ->width(700)
        ->height(550);
}
```

Default force crop is disabled, but you can enable it

```
$this->addFileConversion('promo_image')
    ->width(420)
    ->height(350)
    ->crop();
```

### Disable Conversions

[](#disable-conversions)

If you want to disable registered conversions on some files

```
$model->handleFileFromRequest()->withoutConversions()->toFileCollection();
```

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

[](#configuration)

Define your layout stack in config file.

```
'stack' => 'footer',
```

Or you can use our blade directive.

```
@filemanagerScript
```

Gallery with Dropzone
---------------------

[](#gallery-with-dropzone)

```

```

Attach gallery to model using blelow code.

```
$model->attachGalleryToModelFromRequest('gallery')->toFileCollection();
```

You can also define collection for gallery.

```

```

You can define model to dropzone component as well. When you define model to component all images are automatically attached to model.

```

```

You can also change the default dropzone message.

```

```

Add File from Url
-----------------

[](#add-file-from-url)

```
$model->addFileFromUrl($url, 'image')->toFileCollection();
```

Implements with Laravel Settings
--------------------------------

[](#implements-with-laravel-settings)

Install settings package

```
composer require leromo/laravel-settings
```

Blade component to display old file

```

```

To upload file

```
setting()->upload($request->toArray(), 'file_name');
```

By default we expect file name is your option name, but you can define your option name as well

```
setting()->upload($request->toArray(), 'file_name', 'option_name');
```

### Get Uploaded File Url

[](#get-uploaded-file-url)

```
setting()->getFile('name');
```

Changelog
---------

[](#changelog)

Please see [Releases](../../releases) for more information what has changed recently.

Contributing
------------

[](#contributing)

Pull requests are more than welcome. You must follow the PSR coding standards.

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](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

269d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96fc4db0fe610add63f16c4b0dd3bf184d344074e303cab167cd2575d22dee2d?d=identicon)[leromo](/maintainers/leromo)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leromo-laravel-filemanager/health.svg)

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

###  Alternatives

[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[livewire-filemanager/filemanager

A simple, friendly and practical Livewire filemanager for your applications

3587.6k1](/packages/livewire-filemanager-filemanager)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[farhanshares/laravel-mediaman

MediaMan - The most elegant &amp; powerful media management package for Laravel!

293.7k](/packages/farhanshares-laravel-mediaman)[oneofftech/laravel-tus-upload

Upload files to your Laravel application with the tus.io resumable upload protocol.

517.3k](/packages/oneofftech-laravel-tus-upload)[dgtlss/capsule

A Laravel package for backing up databases and files to external sources with notifications

194.3k](/packages/dgtlss-capsule)

PHPackages © 2026

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