PHPackages                             yuyu-tech/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. yuyu-tech/file-manager

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

yuyu-tech/file-manager
======================

Laravel package to manage storage and it's mapping

2.1.4(2y ago)01.4k↓33.3%11MITPHP

Since Mar 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yuyu-tech/file-manager)[ Packagist](https://packagist.org/packages/yuyu-tech/file-manager)[ RSS](/packages/yuyu-tech-file-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (1)

File Manager - Laravel Package
==============================

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

> To manage storage access for s3 &amp; local filesystem

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

[](#installation)

```
# In your Laravel Project
$ composer require yuyu-tech/file-manager

# Publish package resourceses using
$ php artisan vendor:publish --provider="Yuyu\FileManager\Providers\FileManagerServiceProvider"

#To migrate package resources
$ php artisan migrate --path=database/migration/2019_10_24_090016_create_attachments_table.php

# For ease of use for local storage, create the symbolic link for storage directory using
# Not require for S3 storage
$ php artisan storage:link
```

How can we access it?
---------------------

[](#how-can-we-access-it)

We can generate instance of FileManagerController using below ways.

- Using Facade (FileManager)

```
    use FileManager;
    $objFileManager = new FileManager;
```

- Using Class (FileManagerController)

```
    use \Yuyu\FileManager\Controllers\FileManagerController;
    $objFileManager = new FileManagerController;
```

- Using app helper function (fileManager)

```
    $objFileManager = app('fileManager');
```

Store File
----------

[](#store-file)

We can store eiter file content or UploadedFile object directly.

##### Store UploadFile Object

[](#store-uploadfile-object)

- Use storeFile method of FileManager instance for storing any attachment
- Input Parameters
    - UploadFile Object
    - Object with which it will be mapped.
    - Relationship method name
    - Storage path
- It will return an intance of Attachment.
- For Example:

```
    $objAttachment = FileManager::storeFile($request->file, $user, 'profilePicture', '/user/profile-picture/');
```

##### Store Content

[](#store-content)

- Use storeContent method of FileManager instance for storing content.
- Input Parameters
    - File Content
    - Original file name
    - Mime type
    - File extension
    - Object with which it will be mapped.
    - Relationship method name
    - Storage path
- It will return an intance of Attachment.
- For Example:

```
    $objAttachment = FileManager::storeContent($content, $strFileName, $strMimeType, $strExtension, $user, 'profilePicture', $strPath='user/profile-picture');
```

Generate Access Url
-------------------

[](#generate-access-url)

- We can generate either view or download URL for any attachment using getAccessUrl method of FileManager.
- Input Parameters
    - Attachment ID
    - Access URL Type: eiter "view" or "download", Default Value: "view"
    - Expire After: Minutes after which URL will not be active. By default "1440" Minutes
- It will return URL
- For Example:

```
// Generate a view URL for attachment id 1 which will expire after 50 Minutes.
$strViewUrl = FileManager::getAccessUrl(1, 'view', 50);

// Generate a download URL for attachment id 1 which will never expire
// Here to generate never expire URL we will pass a biggest value for expire after parameter.
$strViewUrl = FileManager::getAccessUrl(1, 'download', 99999999999);
```

###### Note: Here we are not validating existance of an attachment while generating access url.

[](#note-here-we-are-not-validating-existance-of-an-attachment-while-generating-access-url)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

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

Every ~54 days

Recently: every ~74 days

Total

12

Last Release

920d ago

Major Versions

1.0 → 2.02022-04-12

### Community

Maintainers

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

---

Top Contributors

[![merbhushan](https://avatars.githubusercontent.com/u/25707262?v=4)](https://github.com/merbhushan "merbhushan (34 commits)")[![bhushan-ftxinfotech](https://avatars.githubusercontent.com/u/59406451?v=4)](https://github.com/bhushan-ftxinfotech "bhushan-ftxinfotech (1 commits)")

---

Tags

laravelfile manager

### Embed Badge

![Health badge](/badges/yuyu-tech-file-manager/health.svg)

```
[![Health](https://phpackages.com/badges/yuyu-tech-file-manager/health.svg)](https://phpackages.com/packages/yuyu-tech-file-manager)
```

###  Alternatives

[haruncpi/laravel-simple-filemanager

A simple filemanager for Laravel

10535.7k](/packages/haruncpi-laravel-simple-filemanager)[mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual operating modes, drag-and-drop uploads, S3/MinIO support, and comprehensive security features.

718.5k1](/packages/mwguerra-filemanager)[mafftor/laravel-file-manager

The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox

3619.3k](/packages/mafftor-laravel-file-manager)

PHPackages © 2026

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