suhk / datafinder-laravel
This is a package to implement search and filters on the backend level using DataTables and Laravel Models. The best part of this package is the ability to search across multiple tables and rows in a single request (ajax), with or without using joins.
Requires
- php: >=7.3 <8.5
- illuminate/support: 5.8.*|6.*|7.*|8.*|9.*|10.*|11.*
- maatwebsite/excel: 3.*|3.1.*
This package is auto-updated.
Last update: 2025-06-02 22:54:06 UTC
README
An easy, configurable & modular laravel package for Datatables
Introduction
DataFinder is an innovative and highly efficient Laravel package designed to implement advanced search, filtering, and data retrieval functionalities in your applications. It bridges the gap between complex backend queries and dynamic front-end tables, providing developers with a streamlined solution for handling large datasets seamlessly.
The package integrates effortlessly with DataTables on the frontend while leveraging Laravel's robust Eloquent Query Builder on the backend. Its scalable architecture ensures high performance, making it suitable for systems with millions of records.
Key Features
๐ Dynamic Multi-Table Search
- Search seamlessly across multiple database tables using dynamic JOINs, retrieving relevant data efficiently.
๐ Advanced Multi-Filter Search
- Apply multiple filters at once, each supporting multiple values, enabling highly refined search results.
- Combine filter-based search with text-based search, working across single or multiple tables dynamically.
โก Flexible Table Configurations
- Fetch data from any table and define relationships with efficient JOIN operations.
- Supports dynamic configurations for searchable and filterable columns in a single file per module.
๐ Easy Module Setup
- Configure columns, filters, table configuration, database table and their joins, data to display and custom row actions with a single configuration file per module, making setup intuitive and reusable.
๐ฏ Custom Row Actions
- Add interactive buttons for specific actions within the table, ensuring seamless user interaction.
๐ Optimized for Performance & Scalability
- Designed to handle millions of records while maintaining fast and efficient search performance.
Why Use DataFinder?
DataFinder simplifies the integration of DataTables with Laravel by reducing the complexity of repetitive configurations. Its modular approach empowers developers to:
- Dynamically fetch, filter, and display data from the backend.
- Maintain scalability and performance while handling large datasets.
- Enhance user experience with responsive and interactive tables.
- Minimize development overhead with reusable and centralized configuration files.
Documentation
Installation Guide | Usage | Configuration File BreakdownInstallation Guide
Follow these steps to integrate the DataFinder package smoothly into your Laravel project.
Step 1: Install the Package
Run the following command to install the package via Composer:
composer require suhk/datafinder-laravel
Step 2: Add Required CDNs
For DataFinder to work properly, your project must include the following CDNs in your views:
These dependencies are not included in the package to:
- Avoid copyright claims โ We ensure compliance by not bundling third-party assets. Instead, we reference their official websites.
- Maintain flexibility โ Including these libraries would require constant updates with each new release. By relying on your projectโs existing dependencies, DataFinder remains compatible across multiple Laravel and PHP versions.
โ Tested Compatibility:
- PHP: 7.3 โ 8.4
- Laravel: 5.8 โ 11
Make sure to include the required CDNs in your project to ensure DataFinder works seamlessly.
Step 3: Add Service Provider
The package's service provider is auto-loaded upon installation. However, if it is not loaded, manually add the following entry to the providers
array in your config/app.php
file:
SUHK\DataFinder\App\Providers\MainServiceProvider::class,
Step 4: Setup package:
php artisan datafinder:setup
- Loads route & views to autoload
- Publishes required assets for package to public directory
- Publishes the Sample Configuration file to following directory structure:
app/Helpers/DataFinder/sample_configuration.php
- This is the Sample Configuration file used to configure the
datafinder
package per module. It contains default settings and structure that can be customized as needed for your application. - See file breakdown
- This is the Sample Configuration file used to configure the
For comprehensive guidance on how to use this package, please refer to the Usage Instructions. If you need a breakdown of the configuration file and its options, see the Configuration File Breakdown .
Credits:
This project depends on the following open-source libraries, which are not bundled in the package (except SheetJS CE, which is included via CDN). All other libraries are expected to be added via CDN by the end user:
- Bootstrap
- jQuery
- DataTables
- Select2
- SheetJS CE
- CDN used:
https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs
- Licensed under the Apache License 2.0
- ยฉ 2012โpresent SheetJS LLC
- CDN used: