yajra/laravel-datatables
70.3
Strong · 19 September 2026
4.2k
lines of production code
PHP
primary language
1
measurement over time
What this system is
This system is a Laravel DataTables library that provides server-side data processing, filtering, sorting, and pagination for Eloquent models, database queries, and collections. It supports modern Laravel versions through a structured architecture featuring custom exception handling, centralized configuration, and dedicated processors for row transformation and data formatting. The package also integrates with Laravel API Resources and LengthAwarePaginator to handle pre-paginated data efficiently.
How it got here
2013 — Laravel 13 modernization and restructuring
7 changes.
The project underwent a comprehensive overhaul to support Laravel 13 and PHP 8.3, involving a namespace migration from Bllim to Yajra and a complete restructure of the codebase. This period focused on modernizing development standards by integrating static analysis, automated formatting, and GitHub Actions CI, while removing legacy dependencies and placeholder files to streamline the repository.
2015–2022 — Architecture modernization and test expansion
11 changes.
This period focused on refactoring the core data processing logic into dedicated processor classes and introducing standardized contracts for DataTables and Formatters. It also expanded test coverage significantly to include Eloquent relationships, API Resources, and utility functions, while adding new features like Laravel Facades and support for pre-paginated data sources.
Features
Introduce Laravel Facade for DataTables service
A new Laravel Facade class has been added for the DataTables service, allowing users to access the underlying \Yajra\\DataTables\\DataTables\ implementation via the static \DataTables\ alias. The facade includes PHPDoc annotations to provide IDE autocompletion for key methods such as \eloquent\, \query\, and \collection\, improving developer experience when working with the library in Laravel applications.
src/Facades · high confidence
Introduction of a custom base exception class
A new base exception class, \Yajra\\DataTables\\Exceptions\\Exception\, has been added to the \src/Exceptions\ directory. This class extends the standard PHP \Exception\ and serves as the foundational type for all other exceptions within the DataTables library, allowing for more specific error handling by users.
src/Exceptions · high confidence
New DataTable and Formatter contracts introduced
Two new interface contracts have been added to the library: \DataTable\, which defines the core API for retrieving results, counting items, and handling filtering, searching, pagination, and sorting operations, and \Formatter\, which specifies the contract for formatting individual cell values. These interfaces provide a standardized way to implement data table backends and custom formatters within the Yajra DataTables ecosystem.
src/Contracts · high confidence
New utility classes for configuration, request handling, and data processing
This change introduces three new utility classes in the \src/Utilities\ namespace: \Config\, \Helper\, and \Request\. The \Config\ class provides a structured interface to read DataTables-specific settings (such as search wildcards, smart search, case sensitivity, and JSON options) from the application configuration repository. The \Request\ class wraps the base HTTP request to expose DataTables-specific query parameters, including column searchability, orderability, and keyword extraction, while proxying other method calls to the underlying request instance. The \Helper\ class contains static methods for processing data, including compiling Blade templates safely (replacing unsafe \eval\ usage), reflecting callable parameters, and managing array structures for DataTables output. These utilities centralize logic previously scattered across the codebase, improving maintainability and type safety for configuration and request parsing.
src/Utilities · high confidence
Repository restructured with modern tooling and Laravel 13 support
The project has been reorganized to support Laravel 13 and modern PHP development standards. The codebase now requires PHP 8.3 and includes configuration files for static analysis (PHPStan at max level), code formatting (Laravel Pint preset), and refactoring (Rector targeting PHP 8.2). Continuous integration has moved from Travis CI to GitHub Actions, and automated releases are handled by Semantic Release. Documentation has been consolidated into a wiki, with an upgrade guide provided for migrating from previous versions (e.g., dropping ApiResourceDataTable support in v10+).
(repo-wide) · high confidence
Support for Laravel API Resources and Length-Aware Paginators
Users can now pass Laravel API Resources (AnonymousResourceCollection) and LengthAwarePaginator instances directly to the DataTables factory. The new ApiResourceDataTable engine handles API resources by serializing them into collections, while the new PaginatorDataTable engine wraps pre-paginated LengthAwarePaginator instances, skipping client-side pagination and filtering since the data is already paginated on the server side.
src · high confidence
Removals
Removal of legacy Laravel 3 DataTables bundle
The legacy \Bllim\\Datatables\ package (version 1.3) and its associated service provider and facade have been completely removed from the codebase. This eliminates the old Laravel 3-era server-side DataTables integration, which previously handled query building, filtering, and column editing via the \Datatables\ class and \DatatablesServiceProvider\.
src/Bllim · high confidence
Behavioural changes
Introduce DataProcessor and RowProcessor for row transformation
Added the DataProcessor and RowProcessor classes in src/Processors to handle the conversion of query results into DataTables JSON output. DataProcessor manages the core row processing pipeline, including applying append and edit columns, handling raw columns, escaping output, and managing index columns, while RowProcessor specifically handles DT\_RowId, DT\_RowClass, DT\_RowData, and DT\_RowAttr attributes. This refactors the row transformation logic into dedicated processor classes, improving separation of concerns and maintainability of the data formatting layer.
src/Processors · high confidence
Introduce centralized configuration for DataTables behavior
A new \src/config/datatables.php\ configuration file has been added to centralize DataTables settings, replacing the previous placeholder. This allows users to customize search behaviors (such as smart search, multi-term search, case insensitivity, and wildcard usage), define the maximum number of records per page via \max\_length\, and map data builders to specific engines (Eloquent, Query, Collection, Paginator, and ApiResource). The configuration also exposes controls for JSON response headers, error handling modes (throwing exceptions or displaying custom messages), column escaping and raw HTML handling, and null-sorting SQL patterns, providing a single point of adjustment for these core library behaviors.
src/config · high confidence
Removal of empty public directory placeholder
The empty \.gitkeep\ file in the \public\ directory has been removed. This cleanup eliminates the placeholder that was previously used to ensure the directory was tracked by version control, indicating that the directory structure is now managed differently or is no longer required in its previous form.
public · medium confidence
Test coverage
Added test fixtures for Eloquent API Resources; Added test helper for date formatting; Added test models for Eloquent relationship coverage; Added unit tests for DataTables core utilities and query handling; Establishes test infrastructure using Orchestra Testbench; Expanded integration test coverage for DataTables features.
Dependencies
Upgrade to Laravel 13 and PHP 8.3 with namespace and package restructuring
The package has been updated to require Laravel 13 and PHP 8.3, dropping support for older versions. The vendor namespace has changed from 'Bllim' to 'Yajra', and the package name is now 'yajra/laravel-datatables-oracle'. Autoloading has been migrated to PSR-4 under the 'Yajra\\DataTables' namespace, and Laravel auto-discovery is enabled via the 'extra' block. Development dependencies have been updated to include Larastan 3.1, Pint 1.14, and Orchestra Testbench 11, while several plugins (export, buttons, html, fractal, editor) have been moved to suggested packages rather than required dependencies.
(dependencies) · high confidence
Housekeeping
Removal of empty placeholder directories
The empty placeholder files (.gitkeep) in the src/lang, src/migrations, and src/views directories have been removed. This cleanup eliminates unused files from the repository structure, streamlining the project layout without affecting any functional code or user-facing features.
src/lang, src/migrations, src/views · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 70.
Lenses
- Code Health 93
- Architecture 95
- Maturity 59
- Readiness 74
- Security 81
Changes since last survey
- 300 commits — 202 feature/other, 98 fixes
By area
- (root) — 80 commits
- (repo) — 69 commits
- src/QueryDataTable.php — 50 commits
- .github/workflows — 28 commits
- src/EloquentDataTable.php — 12 commits
- src/DataTableAbstract.php — 11 commits
- tests/Integration — 10 commits
- src/Utilities — 9 commits
- src/CollectionDataTable.php — 8 commits
- src/DataTables.php — 4 commits
- tests/Unit — 4 commits
- src/ApiResourceDataTable.php — 2 commits
- src/Contracts — 2 commits
- src/DataTablesServiceProvider.php — 2 commits
- src/Facades — 2 commits
- src/config — 2 commits
- .cursor/rules — 1 commit
- src/Exceptions — 1 commit
- src/PaginatorDataTable.php — 1 commit
- src/Processors — 1 commit
Notable commits
- fix: Apply fixes from StyleCI
- fix: Apply fixes from StyleCI
- fix: Apply fixes from StyleCI
- fix: Apply fixes from StyleCI
- fix: Fix API resource datatable serialization
- fix: Fix collection global search for non-string values
- fix: Fix collection skip total records processing
- fix: Fixed styleci error
- fix: Made scout search fixed ordering optional & enabled sqlite/mssql integration
- fix: Merge branch 'master' into fix/2992-collection-global-search-non-string
- fix: Merge pull request #3216 from Seb33300/fix-duplicate-table-names
- fix: Merge pull request #3236 from Seb33300/fix-column-alias
- fix: Merge pull request #3238 from Seb33300/fix-prefix
- fix: Merge pull request #3252 from ejgandelaberon/fix-ambiguous-column
- fix: Merge pull request #3257 from tusharnain/fix/compile-blade-eval
- fix: Merge pull request #3259 from yajra/fix-mask-value
- fix: Merge pull request #3264 from yajra/fix/phpstan-errors
- fix: Merge pull request #3269 from ChaosPower/fix/2992-collection-global-search-non-string
- fix: Merge pull request #3271 from ChaosPower/fix/3086-edit-index-column
- fix: Merge pull request #3288 from yajra/codex/propose-fix-for-ci-vulnerability-wtpe5g
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
yajra/laravel-datatables was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 76de727015b29ebaa4d50f91daab4199583989d7 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.