定制 wepe/wepetables 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wepe/wepetables

Composer 安装命令:

composer require wepe/wepetables

包简介

Wepetables will help you to use jQuery Datatables in server side with CodeIgniter4.

README 文档

README

Wepetables will help you to use jQuery Datatables in server side with CodeIgniter4.

This is a wrapper class/library inspired and based on Ignited Datatables found at https://github.com/IgnitedDatatables/Ignited-Datatables for CodeIgniter 3.x.

Features

  1. Easy to use. Generates json using only a few lines of code.
  2. Support for table joins (left, right, outer, inner, left outer, right outer).
  3. Able to define custom columns, and filters.
  4. Editable custom variables with callback function support.

Requirements

  • jQuery 1.5+
  • DataTables 1.10+
  • CodeIgniter 4.x "Reactor"

Installation

To install the library please type this on your console

composer require wepe/wepetables

if you're using --no-dev package on your codeigniter, use this command

composer require wepe/wepetables --update-no-dev

Use Library

Declare the following code in the controller that will use Wepetables.

use wepe\Wepetables;

Quick Start

HTML

<table id="myDataTable">
    <thead>
        <tr>
            <th>id</th>
            <th>title</th>
            <th>date</th>
        </tr>
    </thead>
</table>

JavaScript

$(document).ready(function(){
    $('#myDataTable').DataTable({
	"processing": true,
	"serverSide": true,
	"ajax": {
	    "url": '<?=base_url('home/getdata');?>',
	    "type": "POST"
	}
    });
});

Controller

public function getdata(){
    $mytable = new Wepetables();
    $mytable->select('id, title, date');
    $mytable->from('mytable');
    $generated = $mytable->generate();
    return $this->response->setJSON($generated);
}

Usage & Example

Function Reference

License

MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固