# bhavik-bytescoder/package-laravel-custom-grid architecture

> Architecture diagram of the GitHub repository bhavik-bytescoder/package-laravel-custom-grid, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhavik-bytescoder/package-laravel-custom-grid
- Repository: https://github.com/bhavik-bytescoder/package-laravel-custom-grid

## Overview

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: [`src/Http/Controllers/DataGridController.php`](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php) (Request controller), [`src/resources/views/table.blade.php`](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/table.blade.php) (Interactive table), [`src/DatagridServiceProvider.php`](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/DatagridServiceProvider.php) (Laravel provider), [`src/routes/web.php`](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/routes/web.php) (HTTP routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Grid runtime"]
  node_facade["Grid facade<br/>[DataGridFacade.php]"]
  node_grid["Query and render<br/>[DataGrid.php]"]
end

subgraph group_management["Data management"]
  node_controller["Request controller"]
  node_preferences["Column preferences"]
  node_crud["Record CRUD"]
  node_bulk["Bulk deletion"]
  node_import["CSV/TSV import"]
  node_export["CSV/TSV export"]
  node_files[("Export files")]
end

subgraph group_presentation["Grid presentation"]
  node_table["Interactive table<br/>[table.blade.php]"]
  node_scripts["Grid interactions<br/>[script.blade.php]"]
  node_styles["Grid styling<br/>[style.blade.php]"]
  node_assets["Published assets"]
end

subgraph group_package["Package integration"]
  node_routes["HTTP routes<br/>[web.php]"]
  node_config["Grid configuration<br/>[datagrid.php]"]
  node_provider["Laravel provider"]
  node_translations["Grid translations<br/>[grid.php]"]
end

node_app(("Laravel application"))
node_records[("Model records")]

node_app -->|"configures grid"| node_facade
node_facade -->|"resolves binding"| node_grid
node_grid -->|"queries and paginates"| node_records
node_grid -->|"renders view"| node_table
node_table -->|"includes scripts"| node_scripts
node_table -->|"posts preferences"| node_routes
node_scripts -->|"sends requests"| node_routes
node_routes -->|"dispatches requests"| node_controller
node_controller -->|"updates selection"| node_preferences
node_controller -->|"handles records"| node_crud
node_controller -->|"deletes selected rows"| node_bulk
node_controller -->|"imports rows"| node_import
node_controller -->|"exports rows"| node_export
node_controller -->|"reads and writes"| node_records
node_controller -->|"writes export"| node_files
node_provider -->|"loads routes"| node_routes
node_provider -->|"merges config"| node_config
node_provider -->|"loads translations"| node_translations
node_provider -->|"publishes assets"| node_assets
node_table -.->|"uses layout"| node_styles
node_table -.->|"reads options"| node_config

click node_facade "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Facades/DataGridFacade.php"
click node_grid "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/DataGrid.php"
click node_table "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/table.blade.php"
click node_scripts "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/layouts/script.blade.php"
click node_styles "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/layouts/style.blade.php"
click node_assets "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/tree/main/src/public/assets"
click node_routes "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/routes/web.php"
click node_controller "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_preferences "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_crud "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_bulk "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_import "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_export "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php"
click node_config "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/config/datagrid.php"
click node_provider "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/DatagridServiceProvider.php"
click node_translations "https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/lang/en/grid.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_facade,node_grid toneBlue
class node_controller,node_preferences,node_crud,node_bulk,node_import,node_export,node_files,node_records toneAmber
class node_table,node_scripts,node_styles,node_assets toneMint
class node_routes,node_config,node_provider,node_translations toneRose
class node_app toneIndigo
```

## Components

### Grid runtime

- [Grid facade](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Facades/DataGridFacade.php): `src/Facades/DataGridFacade.php`
- [Query and render](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/DataGrid.php): `src/DataGrid.php`

### Data management

- [Request controller](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- [Column preferences](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- [Record CRUD](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- [Bulk deletion](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- [CSV/TSV import](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- [CSV/TSV export](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/Http/Controllers/DataGridController.php): `src/Http/Controllers/DataGridController.php`
- **Export files**

### Grid presentation

- [Interactive table](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/table.blade.php): `src/resources/views/table.blade.php`
- [Grid interactions](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/layouts/script.blade.php): `src/resources/views/layouts/script.blade.php`
- [Grid styling](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/views/layouts/style.blade.php): `src/resources/views/layouts/style.blade.php`
- [Published assets](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/tree/main/src/public/assets): `src/public/assets`

### Package integration

- [HTTP routes](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/routes/web.php): `src/routes/web.php`
- [Grid configuration](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/config/datagrid.php): `src/config/datagrid.php`
- [Laravel provider](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/DatagridServiceProvider.php): `src/DatagridServiceProvider.php`
- [Grid translations](https://github.com/bhavik-bytescoder/package-laravel-custom-grid/blob/main/src/resources/lang/en/grid.php): `src/resources/lang/en/grid.php`

### Other components

- **Laravel application**
- **Model records**

## Connections

- Laravel application → Grid facade: configures grid (evidence: `README.md`)
- Grid facade → Query and render: resolves binding
- Query and render → Model records: queries and paginates (evidence: `src/DataGrid.php`)
- Query and render → Interactive table: renders view (evidence: `src/DataGrid.php`)
- Interactive table → Grid interactions: includes scripts (evidence: `src/resources/views/table.blade.php`)
- Interactive table → HTTP routes: posts preferences (evidence: `src/resources/views/table.blade.php`)
- Grid interactions → HTTP routes: sends requests (evidence: `src/resources/views/layouts/script.blade.php`)
- HTTP routes → Request controller: dispatches requests (evidence: `src/routes/web.php`)
- Request controller → Column preferences: updates selection (evidence: `src/routes/web.php`)
- Request controller → Record CRUD: handles records (evidence: `src/routes/web.php`)
- Request controller → Bulk deletion: deletes selected rows (evidence: `src/routes/web.php`)
- Request controller → CSV/TSV import: imports rows (evidence: `src/routes/web.php`)
- Request controller → CSV/TSV export: exports rows (evidence: `src/routes/web.php`)
- Request controller → Model records: reads and writes (evidence: `src/Http/Controllers/DataGridController.php`)
- Request controller → Export files: writes export (evidence: `src/Http/Controllers/DataGridController.php`)
- Laravel provider → HTTP routes: loads routes (evidence: `src/DatagridServiceProvider.php`)
- Laravel provider → Grid configuration: merges config (evidence: `src/DatagridServiceProvider.php`)
- Laravel provider → Grid translations: loads translations (evidence: `src/DatagridServiceProvider.php`)
- Laravel provider → Published assets: publishes assets (evidence: `src/DatagridServiceProvider.php`)
- Interactive table → Grid styling: uses layout
- Interactive table → Grid configuration: reads options
