All Projects → marcosrjjunior → Lvlgrid

marcosrjjunior / Lvlgrid

✨ Grid helper to your Laravel application. Filter, order and pagination ajax

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lvlgrid

Laravel Datatables Html
Laravel DataTables HTML Builder Plugin
Stars: ✭ 188 (+2585.71%)
Mutual labels:  laravel, datatables
Datatables
PHP Library to handle server-side processing for Datatables, in a fast and simple way.
Stars: ✭ 185 (+2542.86%)
Mutual labels:  laravel, datatables
Dt54
Laravel 5.4 DataTables Demo Application (WIP)
Stars: ✭ 27 (+285.71%)
Mutual labels:  laravel, datatables
Laravel Datatables
jQuery DataTables API for Laravel 4|5|6|7|8
Stars: ✭ 4,134 (+58957.14%)
Mutual labels:  laravel, datatables
Laravel Livewire Tables
A dynamic table component for Laravel Livewire
Stars: ✭ 288 (+4014.29%)
Mutual labels:  laravel, datatables
Laravel Datatables Buttons
jQuery DataTables Buttons Plugin for Laravel.
Stars: ✭ 192 (+2642.86%)
Mutual labels:  laravel, datatables
Querybuilderparser
A simple to use query builder for the jQuery QueryBuilder plugin for use with Laravel.
Stars: ✭ 126 (+1700%)
Mutual labels:  laravel, datatables
Swiftdatatables
A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
Stars: ✭ 287 (+4000%)
Mutual labels:  grid, datatables
Datatablesbundle
This Bundle integrates the jQuery DataTables plugin into your Symfony application.
Stars: ✭ 334 (+4671.43%)
Mutual labels:  grid, datatables
Laratables
Ajax support of DataTables (Laravel 5.5+) Demo @
Stars: ✭ 451 (+6342.86%)
Mutual labels:  laravel, datatables
Sensei Grid
Simple and lightweight data grid in JS/HTML
Stars: ✭ 808 (+11442.86%)
Mutual labels:  grid
Laravel Blade Directives
A collection of nice Laravel Blade directives
Stars: ✭ 813 (+11514.29%)
Mutual labels:  laravel
Barcode
Laravel 5 Barcode Generator
Stars: ✭ 826 (+11700%)
Mutual labels:  laravel
Laravel Like Vue Validator
An input validator mixin for Vue.js
Stars: ✭ 7 (+0%)
Mutual labels:  laravel
Laravel Ffmpeg
This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
Stars: ✭ 807 (+11428.57%)
Mutual labels:  laravel
Adldap2 Laravel
LDAP Authentication & Management for Laravel
Stars: ✭ 825 (+11685.71%)
Mutual labels:  laravel
Udocker
A basic user tool to execute simple docker containers in batch or interactive systems without root privileges
Stars: ✭ 802 (+11357.14%)
Mutual labels:  grid
Laravel5 Cheatsheet
A quick reference guide (cheat sheet) for Laravel 5.1 LTS, listing artisan, composer, routes and other useful bits of information.
Stars: ✭ 799 (+11314.29%)
Mutual labels:  laravel
Repository
Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
Stars: ✭ 795 (+11257.14%)
Mutual labels:  laravel
Scaffold Interface
🚀 A Smart CRUD Generator For Laravel
Stars: ✭ 836 (+11842.86%)
Mutual labels:  laravel

lvlGrid

lvlgrid

Documentation


Dependencies

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js"></script>

Installation

First, pull in the package through Composer.

composer require mrjj/lvlgrid

And then include the service provider within app/config/app.php.

'providers' => [
    Mrjj\LvlGrid\LvlGridServiceProvider::class
];

Getting started

First, create add a route to grid method

Route::get('countries/grid', '[email protected]');

Use a trait and add a required informations in your controller

use Mrjj\LvlGrid\LvlGrid;

class ..Controller extends Controller
{
    use LvlGrid

    protected $gridModel = \App\Models\Country::class;

    protected $threshold = 30;  
    ...
}

Finally, add this @includes(lvlgrid::...) , lvlgrid component and fill your infos

@extend('default')

@section('scripts')

    @include('lvlgrid::scripts')

@stop

@section('content')
    <h3>lvlGrid</h3>

    @include('lvlgrid::grid')  

    <div id="lvlgrid">

        <lvlgrid
            :data="items"
            :columns="[{
                'key': 'name',
                'name': 'Name'
            },{
                'key': 'monetary',
                'name': 'Monetary unit'
            }]"
            :routes="{
                function: '/countries/grid',
                edit: {
                    column: 'id',
                    name: '/countries/:column/edit'
                },
                delete: {
                    column: 'id',
                    name: '/countries/:column/delete'
                }
            }">
        </lvlgrid>

    </div>  
    ..

Get Data

Add a gridData() method if you want to customize your query

public function gridData()
{
    return DB::table('users')
            ->leftJoin('posts', 'users.id', '=', 'posts.user_id')
}

@return \Illuminate\Database\Query\Builder

Transformer

To transform your data you need add a gridTransformer() method and modify what you want

public function gridTransformer($data)
{
    foreach($data['items'] as $_grid) {
        $_grid->status = trans('form.status.'.$_grid->status);
    }
 }

In this example I'm changing the status for a friendly name like 'Active' and 'Inactive'

If you need to modify the views, you can run:

php artisan vendor:publish --provider="Mrjj\LvlGrid\LvlGridServiceProvider"

The package views will now be located in the app/resources/views/vendor/mrjj/lvlgrid

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].