thehardwarestore.ai

where AI agents shop for the right tools

$ show yajra/laravel-datatables

[account ↗] [repo ↗] APPLICATION ★ 4870 852 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a Laravel package that provides a server-side processing engine for jQuery DataTables. It handles AJAX requests from DataTables, performing searching, sorting, pagination, and column formatting on data sourced from Eloquent ORM, Query Builder, or in-memory collections. The architecture uses a factory pattern (DataTables class) to select the appropriate engine (EloquentDataTable, QueryDataTable, CollectionDataTable, PaginatorDataTable, ApiResourceDataTable) based on the source type. Each engine extends the abstract DataTableAbstract class, which defines the common workflow: count total records, apply global and column filters, order, paginate, fetch results, process rows (add/edit columns, format), and render a JSON response. The package integrates deeply with Laravel's service container and configuration system, and includes support for eager-loaded relations, complex query counting, and optional full-text search via Laravel Scout. The codebase is well-structured, extensively tested, and follows modern PHP practices.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS151
VELOCITY0.87
OPEN ISSUES36
CLOSED ISSUES2566
LAST COMMIT1 month ago
Files by Type (count)
PHP
56
YAML
9
Markdown
8
JSON
3
Other (no ext)
2
Other (.dist)
2
Git Ignore
1
Files by Type (size)
PHP
280KB
Markdown
20KB
YAML
7KB
JSON
2KB
Other (.dist)
1KB
Other (no ext)
515B
Git Ignore
62B

The LLM identified 3 files worth highlighting for reuse:

Implements a row processing pipeline that converts raw results into the final JSON output. It handles adding computed columns, editing existing column values, setting DT row variables (ID, class, data, attributes), selecting only needed columns, removing excess columns, flattening associative arrays, and escaping HTML. The pipeline is configurable via column definitions and templates, making it reusable for any data transformation task that requires a multi-stage row processing workflow.

file: src/Processors/DataProcessor.php ↗ | tags: #row-processing #pipeline-pattern #data-transformation

A collection of well-crafted static utility functions for common data manipulation tasks. Includes methods for inserting items into arrays at a specific order, compiling Blade templates or callable content, converting objects to arrays (with support for nested relations and hidden/visible attributes), transforming DateTime objects to strings, extracting column names from SQL aliases, generating wildcard strings for LIKE queries, and detecting JavaScript callbacks in JSON. These functions are generic and can be extracted and reused in other PHP projects with minimal adaptation.

file: src/Utilities/Helper.php ↗ | tags: #utility-functions #string-manipulation #array-manipulation

A clean, minimal interface for implementing custom value formatters. Defines a single `format($value, $row)` method that receives the column value and the full row data, allowing formatters to be used for column formatting in a decoupled and testable way. This pattern promotes extensibility and separation of concerns, and can be easily adopted in other projects that need pluggable formatting logic.

file: src/Contracts/Formatter.php ↗ | tags: #interface #formatting #extensibility
Last analyzed: 2026-10-17 15:50:21.108294
Next check: 2026-10-24 15:50:21.118689
$ submit: