PHPackages                             sasha-x/yii2-admin - 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. [Admin Panels](/categories/admin)
4. /
5. sasha-x/yii2-admin

ActiveYii2-extension[Admin Panels](/categories/admin)

sasha-x/yii2-admin
==================

Looks like 'universal CRUD' for models list you configure.

v1.0(6y ago)01MITPHPPHP &gt;=7.2

Since Apr 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sasha-x/yii2-admin)[ Packagist](https://packagist.org/packages/sasha-x/yii2-admin)[ RSS](/packages/sasha-x-yii2-admin/feed)WikiDiscussions master Synced today

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

Simple admin panel for yii2
===========================

[](#simple-admin-panel-for-yii2)

Looks like "universal CRUD" for models list you configure. Inspired by PhpMyAdmin &amp; SonataAdminBundle

Простая админ-панель БД для yii2.

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

[](#installation)

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

### Required

[](#required)

1. Either run

```
php composer.phar require --prefer-dist sasha-x/yii2-admin "*"

```

or add

```
"sasha-x/yii2-admin": "*"

```

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

2. In `config/web.php`

```
'modules' => [
        'admin' => [
            'class' => 'sasha_x\admin\Module',
            'models' => [
                'app\models\User',
                ... other models you need to edit ...
            ],
            //optionally
            'allowTruncate' => true,
            'customViewsPath' => '@app/views/admin',
        ],
    ],

//Need to add custom routing
$config['bootstrap'][] = 'admin';
```

### Optional

[](#optional)

3. Tweak scenarios for each destination model. Looks like:

```
    //fields list for each action in admin module gets here
    public function scenarios()
    {
        return [
            'default' => ['username', 'email', 'plainPassword', 'status', 'is_admin'],
            'index' => ['username', 'email', 'status', 'is_admin', 'created_at', 'last_login'],
            'view' => ['id', 'username', 'email', 'status', 'is_admin', 'created_at', 'updated_at', 'last_login'],
            'create' => ['username', 'email', 'plainPassword', 'is_admin'],
            'update' => ['username', 'email', 'plainPassword', 'status', 'is_admin'],
        ];
    }
```

3.b. Make `UserAdmin` model class, if you don't want to touch basic model.

4. Assumed you have User model with is\_admin property. If no, extend and edit AdminController::checkAccess() code.

Change defaults
---------------

[](#change-defaults)

Example:

```
//new default values set
Yii::$container->setDefinitions([
    'yii\data\Pagination' => [
        'defaultPageSize' => 40,
    ],
    'yii\grid\ActionColumn' => [
        'template' => '{update} {delete}',
    ],
    'yii\i18n\Formatter' => [
        'dateFormat' => 'php:Y-m-d',
        'timeFormat' => 'php:H:i:s',
        'datetimeFormat' => 'php:Y-m-d H:i:s',
    ],
]);
```

Custom views
------------

[](#custom-views)

...

TODO
----

[](#todo)

- readOnly flag in table map
- model relations process
- релейшены = лейблы / отключаемые
- названия сценариев - константами/переменными
- расширеные тайпхинты для gridview и \_form
- вынос конфига из центрального в модульный
- кастомные страницы
- modal, jexcel

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

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

2227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88cf2aaad8fead10889a786d0541b2a37315ce804452f2ce93ce4dbce5a37d0f?d=identicon)[sasha-x](/maintainers/sasha-x)

---

Tags

yii2extensioncrudadmindb manager

### Embed Badge

![Health badge](/badges/sasha-x-yii2-admin/health.svg)

```
[![Health](https://phpackages.com/badges/sasha-x-yii2-admin/health.svg)](https://phpackages.com/packages/sasha-x-yii2-admin)
```

###  Alternatives

[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[yiister/yii2-gentelella

Free admin template for backend

277278.3k5](/packages/yiister-yii2-gentelella)

PHPackages © 2026

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