PHPackages                             nerweb/laravel-tblist - 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. [Database &amp; ORM](/categories/database)
4. /
5. nerweb/laravel-tblist

Abandoned → [reillo/grid](/?search=reillo%2Fgrid)ArchivedLibrary[Database &amp; ORM](/categories/database)

nerweb/laravel-tblist
=====================

Simple admin table listing for bootstrap 3 and laravel 4|5

v1.2.2(11y ago)51191MITPHPPHP &gt;=5.3.0

Since Oct 13Pushed 11y ago2 watchersCompare

[ Source](https://github.com/reillo/laravel-tblist)[ Packagist](https://packagist.org/packages/nerweb/laravel-tblist)[ RSS](/packages/nerweb-laravel-tblist/feed)WikiDiscussions master Synced yesterday

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

laravel-tblist
==============

[](#laravel-tblist)

Simple admin table listing for bootstrap 3 and laravel 4|5

---

Installation
============

[](#installation)

Add the following to your `composer.json` file:

```
"nerweb/laravel-tblist": "1.2.x"
```

Then, run `composer update nerweb/laravel-tblist` or `composer install` if you have not already installed packages.

and

Publish assets:

```
php artisan asset:publish nerweb/laravel-tblist

```

Simple Example
==============

[](#simple-example)

First, create a class name `UserTblist`.

```
use Nerweb\Tblist\BaseTblist;

class UserTblist extends BaseTblist {

    // set no result message
    public $noResults = "No User found.";

    function __construct()
    {
        $this->table = 'users';

        $this->setQuery();
        $this->setColumns();
    }

    protected function setQuery()
    {
        $this->query = User::where('active',1);
        $this->columnsToSelect = array('*');
    }

    protected function setColumns()
    {
        $this->addCheckableColumn();

        $this->columns['username'] = array(
            'label'     => 'Username',
            'sortable'  => true,
            'table_column'  => 'users.username',
        );

        $this->columns['email'] = array(
            'label'         => 'Email',
            'sortable'      => true,
            'classes'       => 'someclass someclass2',
            'table_column'  => 'users.email',
            'thead_attr'    => 'style="width:200px" data-someattr="example"',
        );

        $this->addActionColumn();
    }
}
```

Create a route and and its controller. insert below inside the controller method.

```
$list = new UserTblist();
$list->prepareList();

return View::make('users.index', array('list', $list));
```

Create the blade `user/index.blade.php` and insert below.

```
{{ Form:open(array(
    'action' => $list->getBaseURL(),
    'method' =>'get',
    'id' =>'user_tblist',
    'class' =>'tblist-form'
)) }}
{{ $list->getTableData() }}
{{ $list->getPagination() }}
{{ $list->getPaginationInfo() }}
{{ Form::close() }}
```

For complete example, see `example` folder.

---

API Reference
-------------

[](#api-reference)

Note! Child class should always extend `Nerweb\Tblist\BaseTblist`.

### Column

[](#column)

The `column` property accepts a data for column name as a key and column options as a value.

#### Column key

[](#column-key)

The `column key` may or may not exists in the result row. Column key also assumes as the name to be sorted.

Note! if `column key` doesn't exists in the result row, you should create a protected method `colSetTheColumnName` as custom column.

#### Column options

[](#column-options)

OptionstypeDescription`label``string`Column header label.`sortable``bool`Whether sortable or not.`table_column``string`if set, then use its value instead of the `column key` as the column name to sort (i.e `roles.admin`, `users.admin`).`classes``string`table column classes. Note! Both applied to header, footer and body column.`thead_attr``string`Table header attribute.Note! All `column option` is default to `null`.

### Custom Column Display

[](#custom-column-display)

Add protected method `colSetColumnNameToCamel` (i.e `colSetUsername`, `colSetCreatedAt`) that only accepts 1 parameter an object of result row. Then echo or display the string.

#### Example

[](#example)

in your class, `UserTblist` for this example. Add this next to `setColumns` method

```
protected function colSetUsername($row)
{
    echo Html::link("/users/{$row->id}/view", $row->username);
}
```

### Custom Column

[](#custom-column)

Sometimes we want to show column that is not in the result object row.

To do this, add a `column key` to `columns` property and make sure that the `sortable` options is set to `false`.

and

create a method called `colSetYourColumnName($row)` that accepts result row.

### Multiple Tblist

[](#multiple-tblist)

Sometimes we want to display multiple table listing on the same page.

To do this,

- on class initialization, in this case `$list = new UserTblist()`. Override base URL via `$list->setBaseURL($url, $parameters)` method.
- set the tblist form action with `$list->getBaseURL()`.
- create the route with controller and return the json data of the tblist.

Demo
----

[](#demo)

see simple demo [here](http://tblist.nerweb.com/)

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~3 days

Total

6

Last Release

4211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/453ffca7f2ab93c7b23f8c8d240165c1bc315c1b4297e407fa06ee9c4fe72f04?d=identicon)[reillo](/maintainers/reillo)

---

Top Contributors

[![reillo](https://avatars.githubusercontent.com/u/6128004?v=4)](https://github.com/reillo "reillo (15 commits)")

---

Tags

laraveleloquentviewlistingadmintable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nerweb-laravel-tblist/health.svg)

```
[![Health](https://phpackages.com/badges/nerweb-laravel-tblist/health.svg)](https://phpackages.com/packages/nerweb-laravel-tblist)
```

###  Alternatives

[nanigans/single-table-inheritance

Single Table Inheritance Trait

2512.5M3](/packages/nanigans-single-table-inheritance)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[stevebauman/eloquenttable

An HTML table generator for laravel collections

4650.6k2](/packages/stevebauman-eloquenttable)

PHPackages © 2026

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