ajaxblog/rapidgrid 问题修复 & 功能扩展

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

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

ajaxblog/rapidgrid

Composer 安装命令:

composer require ajaxblog/rapidgrid

包简介

关键字:

README 文档

README

Alt text

Installation

The package can be installed via Composer by requiring the "ajaxblog/rapidgrid": "*" package in your project's composer.json.

{
   "require": {
        "philo/laravel-blade": "3.*",
        "ajaxblog/rapidgrid": "*"
    }
}

Usage

<?php



include_once  "vendor/autoload.php";

use \AjaxBlog\RapidGrid\DataGrid;
use \AjaxBlog\RapidGrid\Column;
use \AjaxBlog\RapidGrid\Header;

$row = [[
    "field1" => 10,
    "field2" => 11,
    "link" => rand(1, 100),
    "date" => "2015-10-15 10:14:56",
    "price" => rand(1000, 10000),
    "link" => "link/".rand(1000, 10000),
]];


use Illuminate\Database\Capsule\Manager as Capsule;

$capsule = new Capsule;

$capsule->addConnection([
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => '...',
    'username'  => '...',
    'password'  => '...',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
]);

// Set the event dispatcher used by Eloquent models... (optional)
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
$capsule->setEventDispatcher(new Dispatcher(new Container));

// Make this Capsule instance available globally via static methods... (optional)
$capsule->setAsGlobal();

// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher())
$capsule->bootEloquent();

$model = Capsule::table('model');

$views = __DIR__ . '/views';
$cache = __DIR__ . '/cache';
$blade = new \Philo\Blade\Blade($views, $cache);

$model = new \AjaxBlog\RapidGrid\Criteria\Laravel($model);
$grid = new DataGrid(table_name);
$grid->setLimit(20);

$column1 = Column\Sort::factory("id", "Id")->setHeaders([new Header\Check("id", [1=>1, 2=>2])]);
$column2 = Column\Sort::factory("name", "Name")->setHeaders([new Header\Search("name")]);

$grid->setColumns([
    $column1,
    $column2,
]);


$table = $blade->view()->make("grid", ["grid" => $grid])->render();
echo $blade->view()->make("page", ["table" => $table]);

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-12-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固