{"id":28249089,"url":"https://github.com/rizkhal/inertable","last_synced_at":"2026-02-27T06:02:07.905Z","repository":{"id":37929039,"uuid":"461160985","full_name":"rizkhal/inertable","owner":"rizkhal","description":"🍟 A headless datatable with inertiajs","archived":false,"fork":false,"pushed_at":"2024-09-08T08:24:13.000Z","size":446,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-19T13:14:16.773Z","etag":null,"topics":["datatable","inertiajs","laravel","php","react","serverside","svelte","vue"],"latest_commit_sha":null,"homepage":"","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/rizkhal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://trakteer.id/rizkhal","https://www.buymeacoffee.com/rizkhal"]}},"created_at":"2022-02-19T10:43:06.000Z","updated_at":"2024-12-16T16:06:14.000Z","dependencies_parsed_at":"2024-09-08T09:32:42.758Z","dependency_job_id":"5385d483-0b22-4a30-aea8-79a2db6f371d","html_url":"https://github.com/rizkhal/inertable","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"a2883a098d5fc517e218eaa6fbed47522015c185"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/rizkhal/inertable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizkhal%2Finertable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizkhal%2Finertable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizkhal%2Finertable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizkhal%2Finertable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizkhal","download_url":"https://codeload.github.com/rizkhal/inertable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizkhal%2Finertable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259637125,"owners_count":22888217,"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":["datatable","inertiajs","laravel","php","react","serverside","svelte","vue"],"created_at":"2025-05-19T13:14:08.489Z","updated_at":"2026-02-27T06:02:07.800Z","avatar_url":"https://github.com/rizkhal.png","language":"PHP","funding_links":["https://trakteer.id/rizkhal","https://www.buymeacoffee.com/rizkhal"],"categories":[],"sub_categories":[],"readme":"![Package Logo](https://banners.beyondco.de/INERTABLE.png?theme=light\u0026packageManager=composer+require\u0026packageName=rizkhal%2Finertable\u0026pattern=jigsaw\u0026style=style_1\u0026description=A+Headles+datatable+for+Laravel+with+Inertia\u0026md=1\u0026showWatermark=0\u0026fontSize=100px\u0026images=table\u0026widths=auto)\n\n\u003cp align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/rizkhal/inertable/actions/workflows/tests.yml/badge.svg\"\u003e\n\u003cimg alt=\"GitHub last commit\" src=\"https://github.com/rizkhal/inertable/actions/workflows/tests.yml/badge.svg\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/rizkhal/inertable/actions/workflows/php-cs-fixer.yml/badge.svg\"\u003e\n\u003cimg alt=\"GitHub cs fixer\" src=\"https://github.com/rizkhal/inertable/actions/workflows/php-cs-fixer.yml/badge.svg\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://img.shields.io/github/last-commit/rizkhal/inertable?style=plastic\"\u003e\n\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/rizkhal/inertable\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://img.shields.io/github/issues/rizkhal/inertable\"\u003e\n\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/rizkhal/inertable\"\u003e\n\u003c/a\u003e\n  \n\u003ca href=\"https://img.shields.io/packagist/v/rizkhal/inertable\"\u003e\n\u003cimg alt=\"Packagist Version\" src=\"https://img.shields.io/packagist/v/rizkhal/inertable?color=emerald\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://img.shields.io/packagist/dd/rizkhal/inertable?color=emerald\"\u003e\n\u003cimg alt=\"Packagist Downloads\" src=\"https://img.shields.io/packagist/dd/rizkhal/inertable?color=emerald\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\n## INSTALATION\n\n```bash\ncomposer require rizkhal/inertable\n```\n\n## USAGE\n\n```bash\nphp artisan make:inertable UserTable\n```\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Inertable;\n\nuse App\\Models\\User;\nuse Rizkhal\\Inertable\\Column;\nuse Illuminate\\Support\\Carbon;\nuse Rizkhal\\Inertable\\Inertable;\nuse Illuminate\\Database\\Eloquent\\Builder;\n\nclass UserTable extends Inertable\n{\n    public function query(): Builder\n    {\n        return User::query();\n    }\n\n    public function columns(): array\n    {\n        return [\n            Column::checkbox(),\n            Column::make(__('Name'), 'name')-\u003esortable()-\u003esearchable(),\n            Column::make(__('Email'), 'email')-\u003esortable()-\u003esearchable(),\n            Column::make(__('Verified'), 'email_verified_at')-\u003esortable()-\u003esearchable()-\u003eformat(fn (Carbon $value): string =\u003e $value-\u003eformat('d/m/Y')),\n            Column::make(__('status'), 'status')-\u003esortable()-\u003esearchable(),\n            Column::action(),\n        ];\n    }\n}\n```\n\nAdd hidden response\n\n```php\nprotected $hiddens = [\n    'office'\n];\n```\n\nThe response will include `office` object in response to inertable props.\n\nHidden response also accept relatoin, for example if you have `HasMany` relation from user to posts\n\n```php\nprotected $hiddens = [\n    'user.posts'\n];\n```\n\nThat's will return hidden user posts inside inertable props.\n\n## Usage inside controller\n\nYou can use this with reactjs, svelte or vue with inertajs\n\n```php\npublic function __invoke() {\n    return inertia('/path/to/file.{vue|jsx|svelte}')-\u003einertable(new UserTable());\n}\n```\n\nResponse example\n\n\u003cdetails\u003e\n    \u003csummary\u003eClick view\u003c/summary\u003e\n\n```json\n{\n  \"columns\": [\n    {\n      \"na\": false,\n      \"blank\": false,\n      \"sortable\": true,\n      \"searchable\": true,\n      \"checkbox\": false,\n      \"sortCallback\": null,\n      \"searchCallback\": null,\n      \"formatCallback\": null,\n      \"text\": \"name\",\n      \"column\": \"name\"\n    },\n    {\n      \"na\": false,\n      \"blank\": false,\n      \"sortable\": true,\n      \"searchable\": true,\n      \"checkbox\": false,\n      \"sortCallback\": null,\n      \"searchCallback\": null,\n      \"formatCallback\": null,\n      \"text\": \"email\",\n      \"column\": \"email\"\n    },\n    {\n      \"na\": false,\n      \"blank\": false,\n      \"sortable\": true,\n      \"searchable\": false,\n      \"checkbox\": false,\n      \"sortCallback\": null,\n      \"searchCallback\": null,\n      \"formatCallback\": {},\n      \"text\": \"email_verified_at\",\n      \"column\": \"email_verified_at\"\n    },\n    {\n      \"na\": false,\n      \"blank\": false,\n      \"sortable\": true,\n      \"searchable\": false,\n      \"checkbox\": false,\n      \"sortCallback\": null,\n      \"searchCallback\": null,\n      \"formatCallback\": {},\n      \"text\": \"created_at\",\n      \"column\": \"created_at\"\n    }\n  ],\n  \"data\": {\n    \"current_page\": 1,\n    \"data\": [\n      {\n        \"id\": 1,\n        \"name\": \"Robbie Abernathy\",\n        \"email\": \"nyundt@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 2,\n        \"name\": \"Alfredo Langworth\",\n        \"email\": \"sofia.krajcik@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 3,\n        \"name\": \"Deron Carroll\",\n        \"email\": \"considine.jevon@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 4,\n        \"name\": \"Mr. Geoffrey Ritchie Sr.\",\n        \"email\": \"baumbach.alysha@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 5,\n        \"name\": \"Miss Beth Kirlin IV\",\n        \"email\": \"mauricio.abernathy@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 6,\n        \"name\": \"Davon Huel MD\",\n        \"email\": \"orland78@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 7,\n        \"name\": \"Colleen Welch\",\n        \"email\": \"mertz.chad@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 8,\n        \"name\": \"Alvah Crona\",\n        \"email\": \"albert78@example.org\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 9,\n        \"name\": \"Verlie Streich\",\n        \"email\": \"lubowitz.mckayla@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 10,\n        \"name\": \"Ms. Kristy Yost\",\n        \"email\": \"sauer.justina@example.org\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 11,\n        \"name\": \"Jazmyn Blick\",\n        \"email\": \"corkery.nella@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 12,\n        \"name\": \"Dr. Hyman Hauck\",\n        \"email\": \"tvonrueden@example.net\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 13,\n        \"name\": \"Miss Heather Ernser DDS\",\n        \"email\": \"kozey.dana@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 14,\n        \"name\": \"Jovan Kiehn Jr.\",\n        \"email\": \"bette.barton@example.org\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      },\n      {\n        \"id\": 15,\n        \"name\": \"Mr. Florencio Huel\",\n        \"email\": \"greynolds@example.com\",\n        \"email_verified_at\": \"18/10/2022\",\n        \"created_at\": \"18/10/2022\"\n      }\n    ],\n    \"first_page_url\": \"http://example.test/users?page=1\",\n    \"from\": 1,\n    \"last_page\": 134,\n    \"last_page_url\": \"http://example.test/users?page=134\",\n    \"links\": [\n      {\n        \"url\": null,\n        \"label\": \"\u0026laquo; Previous\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=1\",\n        \"label\": \"1\",\n        \"active\": true\n      },\n      {\n        \"url\": \"http://example.test/users?page=2\",\n        \"label\": \"2\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=3\",\n        \"label\": \"3\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=4\",\n        \"label\": \"4\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=5\",\n        \"label\": \"5\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=6\",\n        \"label\": \"6\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=7\",\n        \"label\": \"7\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=8\",\n        \"label\": \"8\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=9\",\n        \"label\": \"9\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=10\",\n        \"label\": \"10\",\n        \"active\": false\n      },\n      {\n        \"url\": null,\n        \"label\": \"...\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=133\",\n        \"label\": \"133\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=134\",\n        \"label\": \"134\",\n        \"active\": false\n      },\n      {\n        \"url\": \"http://example.test/users?page=2\",\n        \"label\": \"Next \u0026raquo;\",\n        \"active\": false\n      }\n    ],\n    \"next_page_url\": \"http://example.test/users?page=2\",\n    \"path\": \"http://example.test/users\",\n    \"per_page\": 15,\n    \"prev_page_url\": null,\n    \"to\": 15,\n    \"total\": 2000\n  },\n  \"filters\": {\n    \"column\": null,\n    \"search\": null,\n    \"direction\": null,\n    \"filters\": null,\n    \"perpage\": null\n  }\n}\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizkhal%2Finertable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizkhal%2Finertable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizkhal%2Finertable/lists"}