2017 © Pedro Peláez
 

library laravel-grid

Laravel grid package

image

adam-boduch/laravel-grid

Laravel grid package

  • Friday, June 22, 2018
  • by adam-boduch
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2,603 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Laravel Grid

Build Status Scrutinizer Code Quality SensioLabsInsight StyleCI, (*1)

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., (*2)

Example:, (*3)

```php namespace App\Http\Controllers;, (*4)

use Boduch\Grid\Order; use Boduch\Grid\Source\EloquentSource;, (*5)

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()));, (*6)

    return view('users')->with('grid', $grid);
}

} ````, (*7)

Features, (*8)

  • Pagination
  • Filtering
  • Highly customizable
  • Simple usage
  • Different data source (Eloquent model, collection, array)

Installation

Requirements, (*9)

  • PHP >= 7.0
  • Laravel >= 5.2

Installation steps, (*10)

  1. run composer require adam-boduch/laravel-grid
  2. open file config/app.php
  3. add Boduch\Grid\GridServiceProvider::class into providers array

Getting started

To keep your controllers clean, it's highly recommended to keep your grid classes as a separate php file., (*11)

Cookbook

Using twig

@todo, (*12)

Laravel Grid and repository pattern

@todo, (*13)

Laravel Grid and presentation pattern

@todo, (*14)

Table cell modification

@todo, (*15)

Different column name and filter name

@todo, (*16)

The Versions