New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

twomein/laravel-dynatable

A facade for using the dynatable format
1,309 3
Install
composer require twomein/laravel-dynatable
Latest Version:v0.1.1
PHP:>=5.4.0
Laravel:5
License:MIT
Last Updated:Nov 3, 2015
Links: GitHub  ·  Packagist
Maintainer: petermein

#Work had resumed on the original Ifnot library now called White-frame so this is deprecated.

Laravel Dynatable for Laravel 5

A library for sending connecting to the dynatables.js front end.

Credits to ifnot for making the original version of dynatables for laravel.

Installation

composer require twomein/laravel-dynatables

Usage

Register the service provider in the app.config

'Twomein\LaravelDynatable\LaravelDynatableServiceProvider',

Example usage:


    //Get an Eloquent collection
    $cars = Car::all();
    
    //Define the columns you want to send
    $columns = ['id', 'name', 'price', 'stock'];
    
    // Build dynatable response
    return Dynatable::make($cars, $columns, Input::all());
  }
}

Inputs

To give a little bit of insights about the inputs parameter:

'page-length' => (int)$inputs['perPage'],
'page-number' => (int)$inputs['page'],
'offset' => (int)$inputs['offset'],
'sorts' => isset($inputs['sorts']) ? $inputs['sorts'] : null,
'search' => isset($inputs['queries']['search']) ? $inputs['queries']['search'] : null,

Related Packages

openskill/datatable

This is a Laravel 5 package for the server and client side of DataTables (http:/...

11,443 52
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607

Version History

Version Released PHP Laravel License
v0.1.1 >=5.4.0 ~5.0 MIT
v0.1.0 >=5.4.0 ~5.0 MIT