How bhavik-bytescoder/package-laravel-custom-grid works
Custom DataGrid is a Laravel package for rendering and managing configurable, model-backed tables. The principal workflow is an application configuring the facade, which builds a query and renders a Blade table; the table supports search, sorting, pagination, and selected columns. Separate controller endpoints handle column preferences, CRUD, bulk deletion, import, and export. The README documents these capabilities, while the sampled route and view excerpts expose some—but not all—endpoint wiring. The graph therefore omits uncertain links and treats the application’s model/database as external.
Main entry points: DataGridController.php Request controller · table.blade.php Interactive table · DatagridServiceProvider.php Laravel provider · web.php HTTP routes
Components 19
Grid runtime
- Grid facade
src/Facades/DataGridFacade.php - Query and render
src/DataGrid.php
Data management
- Request controller
src/Http/Controllers/DataGridController.php - Column preferences
src/Http/Controllers/DataGridController.php - Record CRUD
src/Http/Controllers/DataGridController.php - Bulk deletion
src/Http/Controllers/DataGridController.php - CSV/TSV import
src/Http/Controllers/DataGridController.php - CSV/TSV export
src/Http/Controllers/DataGridController.php - Export files
Grid presentation
- Interactive table
src/resources/views/table.blade.php - Grid interactions
src/resources/views/layouts/script.blade.php - Grid styling
src/resources/views/layouts/style.blade.php - Published assets
src/public/assets
Package integration
- HTTP routes
src/routes/web.php - Grid configuration
src/config/datagrid.php - Laravel provider
src/DatagridServiceProvider.php - Grid translations
src/resources/lang/en/grid.php
Other components
- Laravel application
- Model records
Connections 21
- Laravel application → Grid facade: configures grid
README.md - Grid facade → Query and render: resolves binding
- Query and render → Model records: queries and paginates
src/DataGrid.php - Query and render → Interactive table: renders view
src/DataGrid.php - Interactive table → Grid interactions: includes scripts
src/resources/views/table.blade.php - Interactive table → HTTP routes: posts preferences
src/resources/views/table.blade.php - Grid interactions → HTTP routes: sends requests
src/resources/views/layouts/script.blade.php - HTTP routes → Request controller: dispatches requests
src/routes/web.php - Request controller → Column preferences: updates selection
src/routes/web.php - Request controller → Record CRUD: handles records
src/routes/web.php - Request controller → Bulk deletion: deletes selected rows
src/routes/web.php - Request controller → CSV/TSV import: imports rows
src/routes/web.php - Request controller → CSV/TSV export: exports rows
src/routes/web.php - Request controller → Model records: reads and writes
src/Http/Controllers/DataGridController.php - Request controller → Export files: writes export
src/Http/Controllers/DataGridController.php - Laravel provider → HTTP routes: loads routes
src/DatagridServiceProvider.php - Laravel provider → Grid configuration: merges config
src/DatagridServiceProvider.php - Laravel provider → Grid translations: loads translations
src/DatagridServiceProvider.php - Laravel provider → Published assets: publishes assets
src/DatagridServiceProvider.php - Interactive table → Grid styling: uses layout
- Interactive table → Grid configuration: reads options