kabbouchi/laravel-table-view
Larablocks Analysis
kabbouchi/laravel-table-view works with Laravel 5, 6 and 7 (latest release v0.3.0, Mar 4, 2020), all past end of life (the last on Sep 6, 2022): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, 6 and 7, past end of life since Sep 6, 2022
- No release in the last 12 months (last: Mar 4, 2020)
- 4 downloads a month (needs 10,000)
- 7 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 4, 2020.
- No releases in the last 12 months.
- First released: Jun 26, 2017.
- Monthly downloads: 4.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.
| Install | |
|---|---|
composer require kabbouchi/laravel-table-view |
|
| Latest Version: | v0.3.0 |
| PHP: | >=5.4 |
| Laravel: | 5 · 6 · 7 |
| License: | MIT |
| Last Updated: | Mar 4, 2020 |
| Links: | GitHub · Packagist |
laravel-table-view
Laravel 5 Package for easily displaying table views for Eloquent Collections.
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
// 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
The MIT License (MIT). Please see License File for more information.
Related Packages
A PHP package to create HTML tables from a data store that can be sorted and pag...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.3.0 | >=5.4 | ~5| | MIT | |
| v0.2.4 | >=5.4 | ~5| | MIT | |
| v0.2.3 | >=5.4 | ~5| | MIT | |
| v0.2.2 | >=5.4 | ~5| | MIT | |
| v0.2.1 | >=5.4 | ~5| | MIT | |
| v0.2.0 | >=5.4 | ~5| | MIT | |
| v0.1.15 | >=5.4 | ~5 | MIT | |
| v0.1.14 | >=5.4 | ~5 | MIT | |
| v0.1.13 | >=5.4 | ~5 | MIT | |
| v0.1.12 | >=5.4 | ~5 | MIT | |
| v0.1.11 | >=5.4 | ~5 | MIT | |
| v0.1.10 | >=5.4 | ~5 | MIT | |
| v0.1.9 | >=5.4 | ~5 | MIT | |
| v0.1.8 | >=5.4 | ~5 | MIT | |
| v0.1.7 | >=5.4 | ~5 | MIT | |
| v0.1.6 | >=5.4 | ~5 | MIT | |
| v0.1.5 | >=5.4 | ~5 | MIT | |
| v0.1.4 | >=5.4 | ~5 | MIT | |
| v0.1.3 | >=5.4 | ~5 | MIT | |
| v0.1.2 | >=5.4 | ~5 | MIT | |
| v0.1.1 | >=5.4 | ~5 | MIT | |
| v0.1.0 | >=5.4 | ~5 | MIT | |
| v0.0.9 | >=5.4 | ~5 | MIT | |
| v0.0.8 | >=5.4 | ~5 | MIT | |
| v0.0.7 | >=5.4 | ~5 | MIT | |
| v0.0.6 | >=5.4 | ~5 | MIT | |
| v0.0.5 | >=5.4 | ~5 | MIT | |
| v0.0.4 | >=5.4 | ~5 | MIT | |
| v0.0.3 | >=5.4 | ~5 | MIT | |
| v0.0.2 | >=5.4 | ~5 | MIT |
Showing the latest 30 of 31. See every release on Packagist