PHPackages                             irpcpro/table-soft - 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. irpcpro/table-soft

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

irpcpro/table-soft
==================

A package for managing table data.convert model data to objects of table.

2.0.0(3y ago)122MITPHPPHP ^8.0

Since Jan 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/irpcpro/table-soft)[ Packagist](https://packagist.org/packages/irpcpro/table-soft)[ RSS](/packages/irpcpro-table-soft/feed)WikiDiscussions main Synced 1mo ago

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

Table Soft
==========

[](#table-soft)

**Version:**2.0.0

A package for managing table data. convert your model or list of your data to table object, easily...

[![Latest Stable Version](https://camo.githubusercontent.com/ef28322152e1a940c83d3bcfa634bfadaa0bad97d969b3eb388c68a3c0acc339/687474703a2f2f706f7365722e707567782e6f72672f6972706370726f2f7461626c652d736f66742f76)](https://packagist.org/packages/irpcpro/table-soft) [![Total Downloads](https://camo.githubusercontent.com/a24bfd15b26cd6b60a384530a62ab37ce62b4454cbf4dd44ece69bf22bd2c35c/687474703a2f2f706f7365722e707567782e6f72672f6972706370726f2f7461626c652d736f66742f646f776e6c6f616473)](https://packagist.org/packages/irpcpro/table-soft) [![Latest Unstable Version](https://camo.githubusercontent.com/ac9d03ebb32b3de4763b6dc85f58f5f1a9769bdb7a1e5c6dcadf4ef2d9bb25ca/687474703a2f2f706f7365722e707567782e6f72672f6972706370726f2f7461626c652d736f66742f762f756e737461626c65)](https://packagist.org/packages/irpcpro/table-soft) [![License](https://camo.githubusercontent.com/ded6985067f3779e2bef900928e230b2dbd67732a34cd51c8bfef4ae6f7725a1/687474703a2f2f706f7365722e707567782e6f72672f6972706370726f2f7461626c652d736f66742f6c6963656e7365)](https://packagist.org/packages/irpcpro/table-soft) [![PHP Version Require](https://camo.githubusercontent.com/8b9b9aab2227df5497c3e4a232663f583720a0a320352ecb9ede157cbcb580ea/687474703a2f2f706f7365722e707567782e6f72672f6972706370726f2f7461626c652d736f66742f726571756972652f706870)](https://packagist.org/packages/irpcpro/table-soft)

[![TableSoft](./src/Helpers/table-soft-image.jpg)](./src/Helpers/table-soft-image.jpg)

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

[](#installation)

---

install package to your laravel project:

```
composer require irpcpro/table-soft

```

Register the TableSoft service provider by adding it to the providers in `config/app.php` file.

```
'providers' => [
    ...
    ...
    \Irpcpro\TableSoft\ServiceProviders\TableSoftServiceProvider::class,
]
```

If you want you can alias the TableSoft facade by adding it to the aliases in `config/app.php` file.

```
'aliases' => Facade::defaultAliases()->merge([
    ...
    ...
    'TableSoft' => \Irpcpro\TableSoft\Facade\TableSoftFacade::class,
])->toArray(),
```

Configurations
==============

[](#configurations)

---

- Pass Collection or Builder data into the facade.

```
use TableSoft;

class HomeController extends Controller {
    public function index(){
        // get data from collection
        $data = collect([ [..], [..], [..] ]);

        // Or ..

        // get data from models
        $data = App\Models\Product::query();

        // finally pass the data to TableSoft
        $table = TableSoft::data($data);
    }
}
```

### create columns

[](#create-columns)

---

for adding column to table:

```
$table->column('Title') // default key name = Title
```

### for get data from specific key name:

[](#for-get-data-from-specific-key-name)

---

```
$table->column('Title', 'columnTitle')
$table->column('Title', 'columnTitle:string') // default type column is string
```

can use these type of data:

- int
- string
- float
- date
- bool

### for sorting data:

[](#for-sorting-data)

---

```
$table->column('Title', 'columnTitle:string', 'sort') // default ASC
$table->column('Title', 'columnTitle:string', 'sort:asc')
```

can use these type of sorting data:

- asc
- desc

### callback function for value

[](#callback-function-for-value)

---

```
$table->column('Price', 'price:int', 'sort', function($value){
    return $value . '$';
});
```

also use without sorting data

```
$table->column('Price', 'price:int', function($value){
    return $value . '$';
});
```

the second (fieldName:type) parameter must be set

### set searchable:

[](#set-searchable)

---

```
$table->column('Price', 'price:int', function($value){
    return $value . '$';
})->searchable();
```

or set after define column:

```
$table = $table->column('Price', 'price:int', function($value){
    return $value . '$';
});
$table->searchable();
```

### set width for column:

[](#set-width-for-column)

---

```
$table->setWidth(20);
$table->setWidth(20, 'px');
```

set measure in second parameter

- px
- %

### set row counter automatically:

[](#set-row-counter-automatically)

---

```
$table->rowCounter('row', 'row-name:string', function($val){
    return $value;
});
```

##### Important: the field name should start with `row`

[](#important-the-field-name-should-start-with-row)

### set paginate for list:

[](#set-paginate-for-list)

---

```
$table->paginate(10);
```

if set 0 it will return all data. (without limitation)

### set caching data:

[](#set-caching-data)

---

```
$table->setCaching('id-name-table');
```

`id-name-table` should be a specific and unique string for this table.

### get data from service:

[](#get-data-from-service)

---

```
$data = Http::get('https://...../products');
$data = collect($data->json());
```

### for more:

[](#for-more)

---

```
// get data
$data = Product::query();

// set table
$table = TableSoft::data($data);
$table = $table->column('Title', 'title:string', 'sort')->searchable();
$table = $table->column('Image', 'thumbnail:string', function($value){
    return "";
});
$table = $table->column('Description', 'description:string', 'sort:asc')->searchable();
$table = $table->column('Price', 'price:int', 'sort', function($value){
    return $value . '$';
})->setWidth(50, 'px')->searchable();
$table = $table->rowCounter('row')->setWidth(20,'px');
$table = $table->setCaching('table-product4');
$table = $table->paginate(10);

// get table
$data = $table->get();
```

- the response have several controller for manage your table:

```
array:5 [▼
  "head" => Illuminate\Support\Collection {#334 ▶}
  "body" => Illuminate\Pagination\LengthAwarePaginator {#339 ▶}
  "sort_fields" => Illuminate\Support\Collection {#316 ▶}
  "query_params" => array:3 [▶]
  "exists" => true
]
```

the data of `head` and `body` have same data structure:

```
{
    +title: "Description"
    +name: "description"
    +type: "string"
    +sort: "sort"
    +sortBy: "asc"
    +value: "Description"
    +width: null
    +widthMeasure: null
    +searchable: true
}
```

### here's a sample for show table in blade:

[](#heres-a-sample-for-show-table-in-blade)

---

```

            @foreach($data['head'] as $head)
                {{$head}}
            @endforeach

        @foreach($data['body'] as $body)

                @foreach($body as $item)
                    {!! $item !!}
                @endforeach

        @endforeach

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

1221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e932c40bdc4b3ccccbda72828207fb9f90c588517cd1619db52ee52162c8d2a?d=identicon)[irpcpro](/maintainers/irpcpro)

---

Top Contributors

[![irpcpro](https://avatars.githubusercontent.com/u/35578127?v=4)](https://github.com/irpcpro "irpcpro (67 commits)")

---

Tags

laravelpackagemodel\_to\_tablefilter\_modeldraw\_table

### Embed Badge

![Health badge](/badges/irpcpro-table-soft/health.svg)

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

###  Alternatives

[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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