Download the PHP package hafizhfadh/laravel-simple-datatable without Composer
On this page you can find all versions of the php package hafizhfadh/laravel-simple-datatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hafizhfadh/laravel-simple-datatable
More information about hafizhfadh/laravel-simple-datatable
Files in hafizhfadh/laravel-simple-datatable
Package laravel-simple-datatable
Short Description A Laravel-native datatable engine providing both server-side and client-side processing modes.
License MIT
Homepage https://github.com/hafizhfadh/laravel-simple-datatable
Informations about the package laravel-simple-datatable
Laravel Simple Datatable
Laravel Simple Datatable is a lightweight, framework-native engine designed to bridge Laravel with simple-datatables (and similar frontend libraries). It provides a fluent, secure, and pipeline-driven approach to handling server-side and client-side data processing without the bloat of jQuery or heavy dependencies.
Built with TailwindCSS v4 compatibility in mind and engineered for Laravel 11.x & 12.x, this package offers enterprise-grade performance with a developer-friendly API.
๐ Key Features
- Dual Processing Modes: Seamlessly switch between Server-side (Eloquent Builder) and Client-side (Collection) modes.
- Pipeline-Driven Architecture: Modular execution flow using Laravel's pipeline pattern for Search, Sort, and Pagination stages.
- Secure by Default: Explicit column whitelisting, strict sort direction validation, and parameterized queries to prevent SQL injection.
- Fluent API: Define columns and configuration using a clean, chainable syntax.
- No Frontend Dependencies: Pure PHP backend logic that outputs standard JSON, giving you complete freedom over your frontend stack.
- PHP 8.3+ & Strict Typing: Leveraging the latest PHP features for reliability and performance.
๐ฆ Installation
You can install the package via composer:
๐ง Usage
1. Basic Setup
The simplest way to use the datatable is by passing an Eloquent query or a Collection to the make method.
Server-Side (Recommended for Large Datasets)
Client-Side (Fallback for Small Datasets)
2. Column Configuration
Columns must be explicitly defined to enable interaction. This is a security feature to prevent arbitrary sorting or searching on sensitive fields.
3. Frontend Integration
This package outputs a JSON response compatible with most datatable libraries. Here is an example response structure:
Server Mode Response:
Client Mode Response:
๐จ Frontend Integration
For a comprehensive guide on integrating this package with simple-datatables and styling it with TailwindCSS v4, please refer to our Frontend Integration Guide.
โ๏ธ Advanced Configuration
Manual Mode Selection
You can force a specific mode if needed:
Request Injection
By default, the engine uses the current global request. You can inject a custom request instance:
๐งช Testing
We use Pest for testing. To run the test suite:
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Push to the branch.
- Open a Pull Request.
๐ Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
๐ License
The MIT License (MIT). Please see License File for more information.
HafizhFadh/LaravelSimpleDatatable โ Simple, Secure, Scalable.
All versions of laravel-simple-datatable with dependencies
illuminate/support Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0