PHPackages                             phifty/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. phifty/crud

ActivePhifty-bundle[Framework](/categories/framework)

phifty/crud
===========

CRUD bundle for phifty framework application

3.1.3(9y ago)34221[7 issues](https://github.com/phiftyphp/CRUD/issues)3proprietaryJavaScript

Since Aug 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/phiftyphp/CRUD)[ Packagist](https://packagist.org/packages/phifty/crud)[ RSS](/packages/phifty-crud/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (8)Used By (3)

CRUDSearchAction
----------------

[](#crudsearchaction)

To modify or composite the result data, simply override the searchComposite method:

```
protected function searchComposite(Collection $collection)
{
    return $collection->toInflatedArray();
}

```

React List App
--------------

[](#react-list-app)

To enable react list app, define the property here:

```
protected $reactListApp = '....';

```

Has Many Editor
---------------

[](#has-many-editor)

```
use CRUD\CRUDReactHasManyEditor;

/**
 * itemDesc describes the relationship between data and the placeholder designed in the UI
 * and defines how the cover view should be built
 *
 * @return array
 */
public function itemDesc()
{
    $controls = [];
    if ($this->canCreate) {
        $controls[] = ['action' => 'create'];
    }
    if ($this->canUpdate) {
        $controls[] = ['action' => 'edit'];
    }
    if ($this->canDelete) {
        $controls[] = ['action' => 'delete'];
    }
    return [
        "view" => "ImageCoverView",
        "display" => "float",
        "coverImage" => [
            "field" => ["thumb", "image"],
            "width" => 200,
            "height" => 100,
            "backgroundSize" => "cover"
        ],
        "title" => ["field" => "title" ],
        "controls" => $controls,
    ];
}

/**
 * itemDesc describes the relationship between data and the placeholder designed in the UI
 * and defines how the cover view should be built
 *
 * @return array
 */
public function itemDesc()
{
    $controls = [];
    if ($this->canUpdate) {
        $controls[] = ['action' => 'edit'];
    }
    if ($this->canDelete) {
        $controls[] = ['action' => 'delete'];
    }
    return [
        "view" => "TextCoverView",
        "display" => "block",
        "title" => [ "field" => "name" ],
        "subtitle" => ["format" => "備註: {comment}"],
        "desc" => [ "field" => "description" ],
        "footer" => [
            "columns" => [
                [ "text" => [ 'format' => '數量 {quantity}' ] ],
                [ "text" => [ 'format' => '價格 $ {price}' ] ]
            ]
        ],
        "controls" => $controls,
    ];
}

/**
 * itemDesc describes the relationship between data and the placeholder designed in the UI
 * and defines how the cover view should be built
 *
 * @return array
 */
public function itemDesc()
{
    $controls = [];
    if ($this->canUpdate) {
        $controls[] = ['action' => 'edit'];
    }
    if ($this->canDelete) {
        $controls[] = ['action' => 'delete'];
    }
    return [
        "view" => "TextCoverView",
        "display" => "block",
        "title" => [ "field" => "name" ],
        "subtitle" => [ "format" => "{address} {cellphone}" ],
        "desc" => [ "field" => "identity_no" ],
        "footer" => [
            /*
            "columns" => [
                [ "text" => [ 'format' => '費用 $ {fee}' ] ],
                [ "text" => [ 'format' => '距離 {distance} km' ] ],
                [ "tags" => [ [ 'format' => '$ {fee}' ], [ 'format' => '{distance} km' ] ] ]
            ]
            */
        ],
        "controls" => $controls,
    ];
}

/**
 * itemDesc describes the relationship between data and the placeholder designed in the UI
 * and defines how the cover view should be built
 *
 * @return array
 */
public function itemDesc()
{
    $controls = [];
    if ($this->canCreate) {
        $controls[] = ['action' => 'create'];
    }
    if ($this->canUpdate) {
        $controls[] = ['action' => 'edit'];
    }
    if ($this->canDelete) {
        $controls[] = ['action' => 'delete'];
    }
    return [
        'columns' => [
            [ 'label' => '姓名', 'key' => 'name' ],
            [ 'label' => '性別', 'key' => 'gender' ],
            [ 'label' => '身份證字號', 'key' => 'identity_no' ],
            [ 'label' => '手機', 'key' => 'cellphone' ],
            [ 'label' => '地址', 'key' => 'address', 'style' => [ 'maxWidth' => 180, 'display' => 'inline-block' ]],
            [ 'label' => '組別', 'key' => 'event_group_title', ],
            [ 'label' => '費用', 'key' => 'total_amount' ],
        ],
        'controls' => $controls,
    ];
}

public function itemViewBuilder()
{
    return 'EventRatingViewBuilder';
}

```

Using React Editor in the templates

```
public function createRegionActionPrepare()
{
    parent::createRegionActionPrepare();
    $record = $this->getCurrentRecord();

    $controller = new EventProductCRUDHandler;
    $this->assign('productEditAppConfig', $controller->buildReactHasManyEditorConfig($record, 'products')); // it belongs to reviews
}

{% reactapp "CRUDHasManyEditor" with productTypeEditAppConfig %}

```

Override Search Action

```
/**
 * @override searchAction
 */
public function searchAction()
{
    $collection = $this->search($this->getRequest());
    $items = [];
    foreach ($collection as $record) {
        $array = $record->toInflatedArray();
        $array['product'] = $record->product->toInflatedArray();
        $items[] = $array;
    }
    return $this->toJson($items);
}

/**
 * Provide the search functionality to return matched collection in JSON
 * format response.
 */
public function searchAction()
{
    $collection = $this->search($this->getRequest());
    return $this->toJson(array_map(function($item) {
        $array = $item->toInflatedArray();
        $array['gender'] = $item->display('gender');
        $array['total_amount'] = $item->calculateTotalAmount();
        if ($item->event_group_id) {
            $array['event_group_title'] = $item->event_group->title;
        }
        return $array;
    }, $collection->items()));
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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 ~78 days

Recently: every ~57 days

Total

7

Last Release

3469d ago

Major Versions

2.11.0 → 3.0.02016-03-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc34cde233b660869ff329ed8e20df611f75dfb61aab3e30889ac153d3e5e61?d=identicon)[c9s](/maintainers/c9s)

---

Top Contributors

[![c9s](https://avatars.githubusercontent.com/u/50894?v=4)](https://github.com/c9s "c9s (410 commits)")[![azole](https://avatars.githubusercontent.com/u/2560515?v=4)](https://github.com/azole "azole (2 commits)")

### Embed Badge

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

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

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/recommended-project

Project template for Drupal projects with a relocated document root

1502.6M1](/packages/drupal-recommended-project)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[october/rain

October Rain Library

1601.7M63](/packages/october-rain)[juzaweb/cms

Juzaweb CMS is a Content Management System (CMS) developed based on Laravel Framework and web platform whose sole purpose is to make your development workflow simple again. Project develop by Juzaweb

187571.2k](/packages/juzaweb-cms)

PHPackages © 2026

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