PHPackages                             kabbouchi/laravel-table-view - 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. [Templating &amp; Views](/categories/templating)
4. /
5. kabbouchi/laravel-table-view

ActiveLibrary[Templating &amp; Views](/categories/templating)

kabbouchi/laravel-table-view
============================

Laravel 5 Package for easily displaying table views for Eloquent Collections.

v0.3.0(6y ago)813.9k22MITPHPPHP &gt;=5.4

Since Jun 26Pushed 6y ago2 watchersCompare

[ Source](https://github.com/KABBOUCHI/laravel-table-view)[ Packagist](https://packagist.org/packages/kabbouchi/laravel-table-view)[ RSS](/packages/kabbouchi-laravel-table-view/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (32)Used By (2)

laravel-table-view
==================

[](#laravel-table-view)

Laravel 5 Package for easily displaying table views for Eloquent Collections.

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

[](#installation)

```
composer require kabbouchi/laravel-table-view
```

Next, you must install the service provider:

```
// config/app.php
'providers' => [
    ...
    KABBOUCHI\TableView\TableViewServiceProvider::class,
];
```

You can publish and add custom styles for table view:

```
php artisan vendor:publish --provider="KABBOUCHI\TableView\TableViewServiceProvider" --tag="tableView"
```

Usage
-----

[](#usage)

```
    // Collection
    $users = User::all();

    // or

    // Builder
    $users = User::query(); //  User::where('active',true) ...

    tableView($users)->render();
```

```
    $users = User::all();

    tableView($users)
           ->column('ID', 'id')
           ->column('Active', 'active','boolean')
           ->column('Featured', 'active','boolean|No,Yes')
           ->column('Photo', 'photo','image')
           ->column('Avatar', 'avatar','image|200,200')
           ->column('full_name') // ->column('Full name','full_name')
           ->column('Created At', function ($model) {
                           return $model->created_at->diffForHumans();
            })
            ->render();
```

```
    // tableView with client side pagination (dataTable)

    // controller
    $users = collect([
       (object) ["id" => 1, "user" => "User 1"],
       (object) ["id" => 2, "user" => "User 2"],
       (object) ["id" => 3, "user" => "User 3"],
       (object) ["id" => 4, "user" => "User 4"]

    ]);

    $table = tableView($users)
             ->setTableClass('table table-striped')
             ->useDataTable(); // You need to add @stack('scripts') and @stack('styles') in your main blade template

    // view
     $table->render();
```

```
    // tableView with server side pagination

    // controller
    $users = User::all();

    $table = tableView($users)
               ->column('ID', 'id')
               ->column('Active', 'active','boolean')
               ->column('Country', 'country.name') // $user->country->name
               ->column('Name', 'name:search') // enable search for names
               ->column('Created At', function ($model) {
                 return $model->created_at->diffForHumans();
                })
               ->childDetails(function (User $user) {
                 return view('partials.user-details',compact('user')); // return view or string
                });
                ->appendsQueries(true) // or pass an Array for specific queries e.g: ['foo','bar']
                ->paginate(); // default 15

    // view
    $table->render();
```

Specify custom attribute for each `tr`

```
    $table = tableView(User::all())
                ->setTableRowAttributes([
                    'class' => 'tr-class'
                ]);
```

Specify custom attribute for each `tr` using closure

```
    $table = tableView(Category::all()
                ->setTableBodyClass('sortable')
                ->setTableRowAttributes(function (Category $categ) {
                    return [
                        'data-order-id' => $categ->order_index
                    ];
                });
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Every ~32 days

Recently: every ~44 days

Total

31

Last Release

2259d ago

PHP version history (2 changes)v0.0.1PHP &gt;=7.0

v0.0.2PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/262a11f6a501bc3542b512aa3793e586f1162e8b300161824f1e13d425fa1bf3?d=identicon)[KABBOUCHI](/maintainers/KABBOUCHI)

---

Top Contributors

[![KABBOUCHI](https://avatars.githubusercontent.com/u/9212274?v=4)](https://github.com/KABBOUCHI "KABBOUCHI (68 commits)")

---

Tags

laravel5laravel55laravletabletableviewlaravelviewtabletable-view

### Embed Badge

![Health badge](/badges/kabbouchi-laravel-table-view/health.svg)

```
[![Health](https://phpackages.com/badges/kabbouchi-laravel-table-view/health.svg)](https://phpackages.com/packages/kabbouchi-laravel-table-view)
```

###  Alternatives

[itstructure/laravel-grid-view

Grid view for laravel framework

2546.6k2](/packages/itstructure-laravel-grid-view)[torann/device-view

Provides support for device based view layouts in Laravel.

146.6k](/packages/torann-device-view)[delatbabel/viewpages

Support rendering/view of Laravel pages and templates from a database.

121.4k](/packages/delatbabel-viewpages)

PHPackages © 2026

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