bagisto-datagrid-development
Installation
SKILL.md
DataGrid Development
An admin listing page is a DataGrid subclass plus three lines of wiring. The
engine (packages/Webkul/DataGrid) owns paging, search, filtering, sorting,
saved filters and export; the subclass supplies a query and describes its
columns. There are 51 of them in the codebase — copy the closest one rather than
inventing a shape.
The four methods
Webkul\DataGrid\DataGrid declares two abstract methods and two optional hooks:
| Method | Required | Purpose |
|---|---|---|
prepareQueryBuilder() |
yes | Return a query builder, not a collection |
prepareColumns() |
yes | addColumn([...]) per column |
prepareActions() |
no | Per-row actions, each ACL-gated |
prepareMassActions() |
no | Checkbox actions, each ACL-gated |