PHPackages                             larafiler/larafiler - 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. larafiler/larafiler

ActiveLibrary

larafiler/larafiler
===================

Laravel well-structured file manager

1.0.0(2y ago)014MITPHPPHP &gt;=7.4

Since Jun 13Pushed 2y ago1 watchersCompare

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

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

LaraFiler
=========

[](#larafiler)

LaraFiler is a well-structured file manager package for Laravel. It provides a convenient way to manage and handle files within your Laravel application. With LaraFiler, you can easily upload, download, delete, and organize files.

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

[](#installation)

You can install LaraFiler via Composer by running the following command:

```
composer require larafiler/larafiler
```

LaraFiler will be automatically discovered and registered in your Laravel application.

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

[](#configuration)

After installing LaraFiler, you can publish its configuration file using the following command:

```
php artisan vendor:publish --provider="LaraFiler\Providers\LaraFilerServiceProvider"
```

This will publish the `larafm.php` configuration file to your application's `config` directory. You can customize the settings in this file according to your needs.

Don't forget to migrate larafm required table

```
php artisan migrate
```

Usage
-----

[](#usage)

### Uploading Files

[](#uploading-files)

To upload a file using LaraFiler, you can use the `LaraFiler` facade's `upload` method. Here's an example:

```
use LaraFiler\Facades\LaraFiler;

$file = $request->file('file');
$uploader = LaraFiler::upload($file); // Must be instance of Illuminate\Http\UploadedFile
$document = $uploader->eloquent();
```

The `upload` method accepts an instance of `Illuminate\Http\UploadedFile` as the first parameter. It will store the file in the appropriate location and return the file path.

### Downloading or viewing Files

[](#downloading-or-viewing-files)

You can download or view a file using LaraFiler by providing the file path to the `download` or `inline` method:

```
use LaraFiler\Facades\LaraFiler;
use LaraFiler\Models\LarafmDocument;

$slug = 'FV8gQzAa4DkUHaM6NaWBKgYCdRWomry4';
$document = LarafmDocument::where('slug', $slug)->first();
return LaraFiler::download($document);
// or
return LaraFiler::inline($document);
// or
return LaraFiler::download($slug);
// or
return LaraFiler::inline($slug);
```

The `download` || `inline` method will return response with the document or slug as parameters.

### Deleting Files

[](#deleting-files)

To delete a file, you can use the `delete` method:

```
use LaraFiler\Facades\LaraFiler;
use LaraFiler\Models\LarafmDocument;

$slug = 'FV8gQzAa4DkUHaM6NaWBKgYCdRWomry4';
$document = LarafmDocument::where('slug', $slug)->first();
return LaraFiler::delete($document);

// or
return LaraFiler::delete($slug);
```

The `delete` method will remove the file and thumbnails created from the storage and database.

API Reference
-------------

[](#api-reference)

### LaraFiler Facade

[](#larafiler-facade)

The LaraFiler facade provides the following methods:

- `upload(UploadedFile $file): LaraFilerResponse|LaraFilerUploader`: Uploads the given file and returns the file path.
- `download(LarafmDocument|string $doc): LaraFilerResponse`: Downloads the file with the given path for download.
- `inline(LarafmDocument|string $doc): LaraFilerResponse`: Streams the file with the given path for download.
- `delete(LarafmDocument|string $doc): bool`: Deletes the file with the given path. Returns true on success.

License
-------

[](#license)

LaraFiler is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

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

[](#contributing)

Thank you for considering contributing to LaraFiler! You can contribute by opening issues, submitting pull requests, or providing suggestions and feedback.

Support
-------

[](#support)

If you encounter any issues or have any questions or suggestions, please feel free to [open an issue](https://github.com/ali5alkaf5/larafiler/issues) on GitHub.

Credits
-------

[](#credits)

LaraFiler is developed and maintained by [Ali Akbar](https://github.com/ali5alkaf5)

Acknowledgements
----------------

[](#acknowledgements)

We would like to express our gratitude to the Laravel community for their continuous support and inspiration.

Changelog
---------

[](#changelog)

Detailed changes for each release will be documented in the [release notes](https://github.com/ali5alkaf5/larafiler/releases).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1061d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf76f9290650cc63e7bfe6cf84fa818472f6e8ed5cf9ecbb66f857426447fdd8?d=identicon)[aliakbar](/maintainers/aliakbar)

---

Top Contributors

[![ali5alkaf5](https://avatars.githubusercontent.com/u/63591934?v=4)](https://github.com/ali5alkaf5 "ali5alkaf5 (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/larafiler-larafiler/health.svg)

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)[farhanshares/laravel-mediaman

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

293.7k](/packages/farhanshares-laravel-mediaman)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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