twomein/laravel-dynatable 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

twomein/laravel-dynatable

最新稳定版本:v0.1.1

Composer 安装命令:

composer require twomein/laravel-dynatable

包简介

A facade for using the dynatable format

README 文档

README

#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,

统计信息

  • 总下载量: 1.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-03