Package Data | |
---|---|
Maintainer Username: | adam-boduch |
Maintainer Contact: | adam@boduch.net (Adam Boduch) |
Package Create Date: | 2016-08-01 |
Package Last Update: | 2021-05-31 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:13:54 |
Package Statistics | |
---|---|
Total Downloads: | 5,539 |
Monthly Downloads: | 3 |
Daily Downloads: | 0 |
Total Stars: | 9 |
Total Watchers: | 2 |
Total Forks: | 5 |
Total Open Issues: | 4 |
Laravel Grid is a package that helps you display table data. I could not find package that would satisfy my needs so I decided to write one. Now I've been successfully using it in my two projects. I hope you will enjoy it.
Example:
namespace App\Http\Controllers;
use Boduch\Grid\Order;
use Boduch\Grid\Source\EloquentSource;
class UsersController extends Controller
{
public function index()
{
$grid = app('grid.builder')
->createBuilder()
->setDefaultOrder(new Order('id', 'desc'))
->addColumn('id', [
'sortable' => true
])
->addColumn('name')
->addColumn('email')
->addColumn('created_at')
->setSource(new EloquentSource(new \App\Models\User()));
return view('users')->with('grid', $grid);
}
}
Features
Requirements
Installation steps
composer require adam-boduch/laravel-grid
config/app.php
Boduch\Grid\GridServiceProvider::class
into providers
arrayTo keep your controllers clean, it's highly recommended to keep your grid classes as a separate php file.
@todo
@todo
@todo
@todo
@todo