{"id":13609068,"url":"https://github.com/monkenWu/TablesIgniter","last_synced_at":"2025-04-12T17:33:38.373Z","repository":{"id":45980605,"uuid":"235322410","full_name":"monkenWu/TablesIgniter","owner":"monkenWu","description":"Tableslgniter is an addins base on CodeIgniter4. It will help you use jQuery Datatables in server side mode.","archived":false,"fork":false,"pushed_at":"2022-07-18T00:55:22.000Z","size":245,"stargazers_count":13,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T19:51:07.314Z","etag":null,"topics":["ci4","codeigniter4","datatables-serverside","jquery-datatables","library"],"latest_commit_sha":null,"homepage":"https://tablesigniter.monken.tw/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkenWu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-21T11:06:01.000Z","updated_at":"2025-02-06T03:15:53.000Z","dependencies_parsed_at":"2022-07-18T12:31:39.004Z","dependency_job_id":null,"html_url":"https://github.com/monkenWu/TablesIgniter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkenWu%2FTablesIgniter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkenWu%2FTablesIgniter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkenWu%2FTablesIgniter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkenWu%2FTablesIgniter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkenWu","download_url":"https://codeload.github.com/monkenWu/TablesIgniter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497805,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci4","codeigniter4","datatables-serverside","jquery-datatables","library"],"created_at":"2024-08-01T19:01:32.207Z","updated_at":"2025-04-12T17:33:38.341Z","avatar_url":"https://github.com/monkenWu.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# TablesIgniter\n\n[![Latest Stable Version](https://poser.pugx.org/monken/tablesigniter/v)](//packagist.org/packages/monken/tablesigniter) [![Total Downloads](https://poser.pugx.org/monken/tablesigniter/downloads)](//packagist.org/packages/monken/tablesigniter) [![License](https://poser.pugx.org/monken/tablesigniter/license)](//packagist.org/packages/monken/tablesigniter)\n\nTableslgniter is an addins base on CodeIgniter4. It will help you use jQuery Datatables in server side mode.\n\nIf you want to get CodeIgniter3 version of Tableslgniter you can go to this [git repository](https://github.com/monkenWu/TablesIgniter_CI3).\n\n[Visit the sample website and read user guide.](https://tablesigniter.monken.tw/)\n\nTablesIgniter 基於 CodeIgniter4 。它將可以幫助你在 使用 server side mode 中使用 jQuery Datatables。 \n\n如果你希望取得 CodeIgniter3 版本的 Tableslgniter 你可以前往這個 [git儲存庫](https://github.com/monkenWu/TablesIgniter_CI3) 。\n\n[造訪範例網站與使用指南](https://tablesigniter.monken.tw/)\n\n## Install\n\n### Prerequisites\n1. CodeIgniter Framework 4.*\n2. Composer\n\n### Composer Install\n\n```\ncomposer require monken/tablesigniter\n```\n### Use Library\n\nDeclare the following code in the controller that will use TablesIgniter.\n\n```\nuse monken\\TablesIgniter;\n```\n\n## Quick Start\n\n### HTML\n\n```\n\u003ctable id=\"firstTable\"\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eid\u003c/th\u003e\n            \u003cth\u003etitle\u003c/th\u003e\n            \u003cth\u003edate\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n\u003c/table\u003e\n\n```\n\n### JavaScript\n\n```\n$('#firstTable').DataTable({\n    \"aoColumnDefs\": [{ \n        \"bSortable\": false,\n        \"aTargets\": [ 0,1,2 ] \n    }],\n    \"order\":[],\n    \"serverSide\":true,\n    \"searching\": false,\n    \"lengthChange\":false,\n    \"ajax\":{\n        url:\"\u003c?=base_url('home/firstTable')?\u003e\",\n        type:'POST'\n    }\n});\n```\n\n### Controller\n\n```\npublic function firstTable(){\n    $model = new HomeModel();\n    $table = new TablesIgniter();\n    $table-\u003esetTable($model-\u003enoticeTable())\n          -\u003esetOutput([\"id\",\"title\",\"date\"]);\n    return $table-\u003egetDatatable();\n}\n```\n\n1. Calling the \"setTable()\" method must pass in a Query Builder object. TablesIgniter relies on the database query content defined by this object. This object is usually declared in the Model.\n\n2. When calling the \"setOutput()\" method, the array must be passed in. The order of the array will affect the order of the data presented by DataTables. The definition of the string must be the same as the field name of the result queried by \"setTable()\".\n\n3. Calling \"getDatatable()\" will get the json string that meets the requirements of jQuery DataTables.\n\n### Model\n\n```\npublic function noticeTable(){\n    $builder = $this-\u003edb-\u003etable(\"news\");\n    return $builder;\n}\n```\n\nYou are free to use all the methods of Query Builder to meet all your requirements for database query. Finally, you must return the objects generated by Query Builder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmonkenWu%2FTablesIgniter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FmonkenWu%2FTablesIgniter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmonkenWu%2FTablesIgniter/lists"}