PHPackages                             devig/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. devig/laravel-table-view

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

devig/laravel-table-view
========================

Laravel Package for easily displaying table views for Eloquent Collections.

v0.3.1(4y ago)0232MITPHPPHP &gt;=5.4

Since Jun 26Pushed 4y agoCompare

[ Source](https://github.com/devig/laravel-table-view)[ Packagist](https://packagist.org/packages/devig/laravel-table-view)[ RSS](/packages/devig-laravel-table-view/feed)WikiDiscussions master Synced 1mo ago

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

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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.1% 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 ~53 days

Recently: every ~176 days

Total

32

Last Release

1588d 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/ca297b1115bd1d75f9d8878151d27f4ea982528c8d6f74821d1c0dbdfe246dbe?d=identicon)[sait4seo](/maintainers/sait4seo)

---

Top Contributors

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

---

Tags

laravelviewtabletable-view

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/devig-laravel-table-view/health.svg)](https://phpackages.com/packages/devig-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)
