PHPackages                             vgalkin-dev/yii2-crud - 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. [Framework](/categories/framework)
4. /
5. vgalkin-dev/yii2-crud

ActiveYii2-extension[Framework](/categories/framework)

vgalkin-dev/yii2-crud
=====================

0.1.0(2y ago)013.1kMITPHP

Since Aug 26Pushed 2y agoCompare

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

READMEChangelog (1)Dependencies (12)Versions (1)Used By (0)

yii2-crud
=========

[](#yii2-crud)

Provides:

- base ActiveRecord class with behaviors
- base ActiveQuery class for advanced search
- model generator
- ActiveController and a set of Action classes providing a RESTful service with a default HTML format
- default views mechanism

ActiveRecord
------------

[](#activerecord)

### Filtering

[](#filtering)

Filters are separated from validator rules. This allows to perform filtering and validation separately. This is sometimes required when filters modify values in such way they can't be applied twice.

This is implemented in the `netis\crud\db\FilterAttributeValuesTrait` trait. The base AR class also introduces two new events, *beforeFilter* and *afterFilter*.

### Relations

[](#relations)

Since the CRUD renders all model relations, they need to be enumerated in the model. This is done in the new `relations()` method.

Saving relations is done by using the `netis\crud\db\LinkableBehavior` behavior.

Relations are also used for authorization. The base AR class has the `netis\rbac\AuthorizerBehavior` attached.

### Labels

[](#labels)

Models can be cast to string, because the base AR class implements the `__toString()` method. By attaching the `netis\crud\db\LabelsBehavior` behavior, you can select attributes used to generate a string representation of a specific model. The behavior also allows to define general label for a model and its relations.

### Attribute formats

[](#attribute-formats)

Formatter formats can be assigned to model attributes in the `attributeFormats()` method. Defaults are detected based on the database column types.

ActiveController
----------------

[](#activecontroller)

### Response formats

[](#response-formats)

The default response format is HTML. Other supported formats include JSON and XML.

When an action returns a large collection, streaming is used to output data. This is slower, but allows to send an extremely large response and renders and output data at the same time. Thanks to this, paging is not necessary to export whole contents of the database tables.

New formats can be easily added, but this requires providing both a renderer stream and a response formatter classes.

### Default views

[](#default-views)

Defaults views are provided for the HTML response format. They support overriding in the same fashion as in themes.

### Form builder

[](#form-builder)

For the update action's form, the fields are automatically generated based on model's attributes, relations and their formats.

### Relations

[](#relations-1)

The view and update actions display all model relations either as single values (*hasOne*) or grids (*hasMany*). In the update action, for both relation types, new or existing records can be associated with the model being updated.

### Navigation

[](#navigation)

A context menu is available.

### Composite keys

[](#composite-keys)

Both primary and foreign composite keys (consisting of two or more columns) are fully supported.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

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

990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/109d72372c96a2524b0d9d4f385201f4a398b32c4104ccdc1047ed2027638220?d=identicon)[alfagamma](/maintainers/alfagamma)

---

Top Contributors

[![nineinchnick](https://avatars.githubusercontent.com/u/795177?v=4)](https://github.com/nineinchnick "nineinchnick (67 commits)")[![pradziszewski123](https://avatars.githubusercontent.com/u/10596959?v=4)](https://github.com/pradziszewski123 "pradziszewski123 (37 commits)")[![mgryc](https://avatars.githubusercontent.com/u/14289490?v=4)](https://github.com/mgryc "mgryc (3 commits)")[![mozarcik](https://avatars.githubusercontent.com/u/1579480?v=4)](https://github.com/mozarcik "mozarcik (3 commits)")[![vgalkin-dev](https://avatars.githubusercontent.com/u/25930951?v=4)](https://github.com/vgalkin-dev "vgalkin-dev (1 commits)")

### Embed Badge

![Health badge](/badges/vgalkin-dev-yii2-crud/health.svg)

```
[![Health](https://phpackages.com/badges/vgalkin-dev-yii2-crud/health.svg)](https://phpackages.com/packages/vgalkin-dev-yii2-crud)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[abydahana/aksara

Aksara is a CodeIgniter based CRUD Toolkit you can use to build complex applications become shorter, secure and more reliable just in a few lines of code. Serving both CMS or Framework, produce both HEADLESS (RESTful API) or TRADITIONAL (Browser Based), just by writing single controller. Yet it's reusable, scalable and ready to use!

1101.2k](/packages/abydahana-aksara)

PHPackages © 2026

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