PHPackages                             aditiya/yii2-easyfilemanager - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. aditiya/yii2-easyfilemanager

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

aditiya/yii2-easyfilemanager
============================

Manage and upload file easily. feature are rbac validation and category tag. need db to use.

v1.1.0(3y ago)16MITPHP

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/aditiyass/yii2-easyfilemanager)[ Packagist](https://packagist.org/packages/aditiya/yii2-easyfilemanager)[ RSS](/packages/aditiya-yii2-easyfilemanager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Easy File Manager
=================

[](#easy-file-manager)

Manage and upload file easily. feature are rbac validation and category tag. need db to use.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist aditiya/yii2-easyfilemanager "*"

```

or add

```
"aditiya/yii2-easyfilemanager": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Make sure to migrate all table from `src/migrations` folder.

Once the extension is installed and database is ready, add to module configuration :

```
    'modules' => [
        ...
        'efm' => [
            'class' => 'aditiya\easyfilemanager\Module', // Module class
            'usedemo' => true, // if you want to use demo
        ],
        ...
    ]
```

module parameters are :

- `usedemo` : to use demo in /efm
- `uploadfilepath` : path to upload file folder
- `defaultUrl` : where to get file. you can create costum url by simply extend controller from class `FileController`
- `dbConnection` : custom database connection

to ***upload*** file, use Easyfilemanagermodel. you can set it's category, rolelist (default : `['@','?']`), and description.

to ***get instance object***, you can use `getByKey()` or `getByCategory()`.

to ***get file url***, use `getFileUrl()` function.

```
use aditiya\easyfilemanager\models\Easyfilemanager;

...

//on action create
$model = new Easyfilemanager();

if ($this->request->isPost) {
    $model->rolelists = ['admin','writer'];
    $model->category = 'draftpage';
    $model->description = 'draft page image';
    $key = $model->uploadByInstance($model,'file');
    if($key){
        return $this->redirect(['view', 'key' => $key]);
    }
}
```

you can use `EasyfilemanagerTrait` and `Easyfilemanagerinterface` together in your own model

```
use aditiya\easyfilemanager\interfaces\EasyfilemanagerInterface;
use aditiya\easyfilemanager\traits\EasyfilemanagerTrait;

class ModelExample extends Model implements EasyfilemanagerInterface {
    use EasyfilemanagerTrait;
    ...
    public function getFileUrl()
    {
        return $this->getEfmFileUrl($this->filekey);
    }

    public function uploadFile()
    {
        $is_uploaded = $this->uploadEfmByInstance('filekey');
        if($is_uploaded){
            $this->filekey = $is_uploaded;
            return true;
        }
        return false;
    }

    public function deleteFile()
    {
        return $this->deleteEfm($this->filekey);
    }
    ...
}
```

***update 1.1.0*** : now you can add in rolelist, if you only want specific user with specific role to access your data.

```
$model = new Easyfilemanager();
$model->rolelists = ['admin','writer'=>1,'editor'=>[2,3,4]];
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~2 days

Total

3

Last Release

1381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8af9e8c57206f3475fb043ae0d3f4c0818a1eda26fdb0cb0f9db8e3222ecda83?d=identicon)[aditiya\_ss](/maintainers/aditiya_ss)

---

Top Contributors

[![aditiyass](https://avatars.githubusercontent.com/u/89702148?v=4)](https://github.com/aditiyass "aditiyass (11 commits)")[![aditiyapod](https://avatars.githubusercontent.com/u/85488423?v=4)](https://github.com/aditiyapod "aditiyapod (1 commits)")

---

Tags

phpfilemanagerdbrbacyii2extensionaditiya

### Embed Badge

![Health badge](/badges/aditiya-yii2-easyfilemanager/health.svg)

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

###  Alternatives

[budyaga/yii2-users

Module for manage users and their rights with the support of registration through social services and assigned to each user more than one social service.

409.1k](/packages/budyaga-yii2-users)

PHPackages © 2026

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