{"id":16417047,"url":"https://github.com/open-admin-org/grid-sortable","last_synced_at":"2025-06-22T00:03:21.239Z","repository":{"id":46720558,"uuid":"404383950","full_name":"open-admin-org/grid-sortable","owner":"open-admin-org","description":"Sortable rows for grid view","archived":false,"fork":false,"pushed_at":"2025-06-05T18:53:00.000Z","size":6,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T19:44:06.491Z","etag":null,"topics":[],"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/open-admin-org.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-08T14:42:04.000Z","updated_at":"2025-06-05T18:53:01.000Z","dependencies_parsed_at":"2024-10-28T15:52:58.670Z","dependency_job_id":null,"html_url":"https://github.com/open-admin-org/grid-sortable","commit_stats":{"total_commits":3,"total_committers":3,"mean_commits":1.0,"dds":0.6666666666666667,"last_synced_commit":"74dc15da51ed9e90ee892eaffc34d21f617e01c8"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/open-admin-org/grid-sortable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-admin-org%2Fgrid-sortable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-admin-org%2Fgrid-sortable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-admin-org%2Fgrid-sortable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-admin-org%2Fgrid-sortable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-admin-org","download_url":"https://codeload.github.com/open-admin-org/grid-sortable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-admin-org%2Fgrid-sortable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261212279,"owners_count":23125576,"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-10-11T07:10:51.076Z","updated_at":"2025-06-22T00:03:16.216Z","avatar_url":"https://github.com/open-admin-org.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Open-Admin - grid-sortable\n======\n\nThis extension can help you sort by dragging the rows of the data list, the front end is based on [sortableJS](https://github.com/SortableJS/Sortable), and the back end is based on [eloquent-sortable](https://github.com/spatie/eloquent-sortable)\n\n\n![grid-sortable](https://user-images.githubusercontent.com/86517067/132530216-926934b2-754a-4ec6-9f29-67523aedaf67.gif)\n\n## Installation\n\n```shell\ncomposer require open-admin-ext/grid-sortable\n```\n\n## Usage\n\nDefine your model\n\n```php\n\u003c?php\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Spatie\\EloquentSortable\\Sortable;\nuse Spatie\\EloquentSortable\\SortableTrait;\n\nclass MyModel extends Model implements Sortable\n{\n    use SortableTrait;\n\n    public $sortable = [\n        'order_column_name' =\u003e 'order_column',\n        'sort_when_creating' =\u003e true,\n    ];\n}\n```\n\nUse in grid\n\n```php\n$grid = new Grid(new MyModel);\n\n$grid-\u003esortable();\n```\n\nThis will add a column to the grid. After dragging one row, a `Save order` button will appear at the top of the grid. Click  to save order.\n\n## Translation\n\nThe default text for the button is `Save order`. If you use an other language, such as Simplified Chinese, you can add a translation to the `resources/lang/zh-CN.json` file.\n\n```json\n{\n    \"Save order\": \"保存排序\"\n}\n```\n\nLicense\n------------\nLicensed under [The MIT License (MIT)](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-admin-org%2Fgrid-sortable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-admin-org%2Fgrid-sortable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-admin-org%2Fgrid-sortable/lists"}