{"id":14972472,"url":"https://github.com/intrip/bootstrap-table-generator","last_synced_at":"2025-10-26T19:31:28.937Z","repository":{"id":11171196,"uuid":"13546119","full_name":"intrip/bootstrap-table-generator","owner":"intrip","description":"Dynamic table generator for bootstrap written in php.","archived":false,"fork":false,"pushed_at":"2018-06-03T19:47:07.000Z","size":18,"stargazers_count":14,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T22:51:15.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/intrip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-13T20:22:17.000Z","updated_at":"2023-03-22T21:11:54.000Z","dependencies_parsed_at":"2022-08-30T14:40:31.901Z","dependency_job_id":null,"html_url":"https://github.com/intrip/bootstrap-table-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intrip%2Fbootstrap-table-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intrip%2Fbootstrap-table-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intrip%2Fbootstrap-table-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intrip%2Fbootstrap-table-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intrip","download_url":"https://codeload.github.com/intrip/bootstrap-table-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238394323,"owners_count":19464583,"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":[],"created_at":"2024-09-24T13:46:58.327Z","updated_at":"2025-10-26T19:31:28.539Z","avatar_url":"https://github.com/intrip.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bootstrap 3 Table generator\n\nThis package is a dynamic table generator for Bootstrap 3 written in Php.\nThis package is fully tested and ready for use.\n\n[![Build Status](https://travis-ci.org/intrip/bootstrap-table-generator.png)](https://travis-ci.org/intrip/bootstrap-table-generator)\n\n### Installation \n\nThe first requisite to run the package is to include Bootstrap 3 in your Application.\nFor more info see: \u003ca href=\"http://getbootstrap.com/getting-started/\" target=\"_blank\"\u003ethis link\u003c/a\u003e.\n\nThe next step is to install this package through Composer. Edit your project's `composer.json` file to require `\"jacopo/bootstrap-3-table-generator\": \"dev-master\"`.\n\n\t\"require\": {\n\t\t\"jacopo/bootstrap-3-table-generator\": \"dev-master\"\n\t},\n\t\"minimum-stability\" : \"dev\"\n\nNext, update Composer from the Terminal:\n\n    composer update\n\nThat's it. You successfully installed Bootstrap 3 table generator!\n\n### Usage\n\nTo use te package you need to require `Jacopo\\Bootstrap3Table\\BootstrapTable`.\nHere is an example for a quick usage of the tool:\n\n```PHP\nuse Jacopo\\Bootstrap3Table\\BootstrapTable;\n\n// create the generator class\n$table = new BootstrapTable();\n// set the configuration\n$table-\u003esetConfig(array(\"table-hover\"=\u003efalse, \"table-condensed\"=\u003etrue, \"table-striped\"=\u003etrue ) );\n// set header content (optional)\n$table-\u003esetHeader(array(\"firstCol\") );\n// add table row\n$table-\u003eaddRows(array(\"cell1\",\"cell2\"), array(\"custom-class1\"));\n// you can also add a bigger row\n$table-\u003eaddRows(array(\"cell1\",\"cell2\",\"cell3\"));\n// or add a smaller row\n$table-\u003eaddRows(array(\"cell1\"));\n\n// setup extra custom css classes for the table\n$table-\u003esetTableExtraClasses(array(\"extra-table\"));\n// print the table\necho $table; // equals to echo $table-\u003egetHtml();\n```\n\n### Methods overview\n\nThe methods available are:\n\n`setConfig`: set the base configuration of the table. Accepts an array of options. The option available are:\n\n `table-striped`: Adds zebra-striping to any table row .\n `table-bordered`: Add borders and rounded corners to the table.\n `table-hover`: Enable a hover state on table rows.\n `table-condensed`: Makes tables more compact by cutting cell padding in half.\n `table-responsive`: Makes table responsive.\n `id`: Set the id of the table.\n\nYou can also add extra css classes to the `\u003ctable\u003e`tag. To do that you need to set the\n`setTableExtraClasses()`method.\n\nExample:\n\n```PHP\n$table = new BootstrapTable();\n$table-\u003esetTableExtraClasses(array(\"extra-custom-class\") );\n``` \n\n`setHeader`: this method setup the header of the file, the only parameter is an array that contains the data of each `\u003cth\u003e`.\nSetting header is optional, if not setted the header won't be shown.\n\nExample:\n\n```PHP\n$table = new BootstrapTable();\n$table-\u003esetHeader(array(\"First header column data\") );\n```\n\n`addRows`: add a row of data to the table. Accepts two params: the fist is the array of data, the second is an array of custom css classes to add to the `\u003ctr\u003e` tag.\n\nExample:\n```PHP\n$table = new BootstrapTable();\n$table-\u003eaddRows(array(\"First data column data\"), array(\"custom-class1\") );\n```\n\n#### Dynamic Size\n\nKeep in mind that you dont have to set the size of the table, you can add as many rows as you want\nand the table size will adjust automatically!\n\n#### Printing the table\n\nWhen you're done setting up you table you can just do `echo $table` and you'll see the table as html.\nIf you prefer you can get the html string of the table instead with the `table-\u003egetHtml()` method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintrip%2Fbootstrap-table-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintrip%2Fbootstrap-table-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintrip%2Fbootstrap-table-generator/lists"}