PHPackages                             mheads/yii-table - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mheads/yii-table

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mheads/yii-table
================

Universal table provider for Yii applications: columns, filters, sorting, pagination, and export.

1.0.2(3w ago)119↓87.5%1BSD-3-ClausePHPPHP 8.3 - 8.5

Since Jun 3Pushed 3w ago1 watchersCompare

[ Source](https://github.com/mheads-dev/yii-table)[ Packagist](https://packagist.org/packages/mheads/yii-table)[ RSS](/packages/mheads-yii-table/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (32)Versions (6)Used By (1)

mheads/yii-table
================

[](#mheadsyii-table)

Universal table provider for Yii3 / yiisoft applications: columns, filters, sorting, pagination, export.

`yii-table` gives you a backend contract for data grids. You describe table schema once, then reuse it for HTTP payloads, filtering, sorting, pagination, and export.

What You Get
------------

[](#what-you-get)

- predictable API payload: `config`, `pagination`, `columns`, `filters`, `sorts`, `rows`;
- one place to configure columns, filters, sort options, pagination, and export;
- request parameters applied consistently: `filter`, `sort`, `page`, `prev-page`, `per-page`, `export`;
- CSV/XLSX export and custom formats via `WriterInterface`;
- support for `Yiisoft\Data\Reader\ReadableDataInterface` sources from `yiisoft/data`.

Example application request:

```
/products?filter[categoryName]=Audio&per-page=2&page=1

```

Full example payload:

- [examples/payload\_example.json](examples/payload_example.json)

Requirements
------------

[](#requirements)

- PHP 8.3 - 8.5.
- `yiisoft/data` 2.x.
- `psr/http-message` 2.x.

Optional integrations:

- `yiisoft/data-db` for `QueryDataReader`;
- `yiisoft/data-response` for application-level response formatting;
- `yiisoft/translator` for i18n adapters;
- `ext-xlswriter` for XLSX export.

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

[](#installation)

Install the package with Composer:

```
composer require mheads/yii-table
```

Quick Start
-----------

[](#quick-start)

### 1. Configure DI

[](#1-configure-di)

Start with minimal HTTP wiring:

- [examples/di/common.php](examples/di/common.php)
- [Configuration guide](docs/guide/en/configuration.md)

### 2. Create a table factory

[](#2-create-a-table-factory)

Declare columns, filters, sort options, page size, and export formats:

- [examples/usage/product-list-table-factory.php](examples/usage/product-list-table-factory.php)
- [Table factory guide](docs/guide/en/table-factory.md)

### 3. Add an HTTP action

[](#3-add-an-http-action)

Use `TableHttpOrchestrator` for a single endpoint that applies request parameters and produces a JSON payload or an export response. Split config, rows, and export orchestrators are covered in HTTP usage:

- [examples/usage/query-list-action.php](examples/usage/query-list-action.php)
- [HTTP usage guide](docs/guide/en/http-usage.md)

### 4. Call your endpoint

[](#4-call-your-endpoint)

```
/products?sort=-name&per-page=10&page=1&filter[name]=headphones

```

### 5. Try export

[](#5-try-export)

```
/products?export=csv
/products?export=xlsx

```

Documentation
-------------

[](#documentation)

- [Guide](docs/guide/en/README.md)
- [Examples](examples/README.md)

Common entry points:

- [Filters](docs/guide/en/filters.md)
- [Sorting](docs/guide/en/sorting.md)
- [Pagination](docs/guide/en/pagination.md)
- [Keyset pagination](docs/guide/en/keyset-pagination.md)
- [Sync export](docs/guide/en/export.md)
- [Async export](docs/guide/en/async-export.md)
- [I18n](docs/guide/en/i18n.md)
- [HTTP error contract](docs/guide/en/error-contract.md)
- [Advanced documentation map](docs/guide/en/advanced-map.md)

Examples
--------

[](#examples)

The examples are intentionally compact and focused on contract demonstration. They are not intended to be executed directly from `vendor/.../examples` without adaptation.

- [examples/README.md](examples/README.md)

License
-------

[](#license)

This package is released under the terms of the BSD-3-Clause License. See [LICENSE.md](LICENSE.md) for details.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~6 days

Total

5

Last Release

26d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8805360bd6ba1a19f70a9a23819afe7109a80ea0a4c387201f4fa986a50c75f8?d=identicon)[alse0017](/maintainers/alse0017)

---

Top Contributors

[![sa-machineheads](https://avatars.githubusercontent.com/u/22737984?v=4)](https://github.com/sa-machineheads "sa-machineheads (9 commits)")[![alse0017](https://avatars.githubusercontent.com/u/13018747?v=4)](https://github.com/alse0017 "alse0017 (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mheads-yii-table/health.svg)

```
[![Health](https://phpackages.com/badges/mheads-yii-table/health.svg)](https://phpackages.com/packages/mheads-yii-table)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k20](/packages/anthropic-ai-sdk)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)[oat-sa/tao-core

TAO core extension

65143.7k124](/packages/oat-sa-tao-core)

PHPackages © 2026

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