rafaelqm / laravel-datatables by rafaelqm
forked from yajra/laravel-datatables

jQuery DataTables API for Laravel 4|5
2,019
0
1
Package Data
Maintainer Username: rafaelqm
Maintainer Contact: aqangeles@gmail.com (Arjay Angeles)
Package Create Date: 2016-01-12
Package Last Update: 2016-02-12
Home Page: http://datatables.yajrabox.com/
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:05:41
Package Statistics
Total Downloads: 2,019
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 1
Total Open Issues: 0

Datatables Package for Laravel 4|5

Laravel 4.2|5.0|5.1|5.2 Latest Stable Version Build Status Scrutinizer Code Quality Total Downloads License

This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection.

Feature Overview

  • Supports the following data source
    • Eloquent ORM
    • Fluent Query Builder
    • Collection [available on v5.x and later]
  • DataTable Service Implementation (v6.x).
  • Adding or editing content of columns and removing columns
  • Modify column values via Blade Template Engine or by using Closure
  • Works with ALL the DATABASE supported by Laravel
  • Works with Oracle Database using Laravel-OCI8 package
  • Works with DataTables v1.10++.
    • Note: DT Legacy code is not supported on v5.x
  • Works with DataTables v1.9 and v1.10 legacy code.
    • Note: Use v4.x for Laravel 5 and v3.x for Laravel 4
  • Extended column filtering via filterColumn API.
  • Extended column ordering via orderColumn API.
  • Extended Query Builder functionality allowing you to filter using Datatables class directly.
  • Decorate your data output using league\fractal Transformer with Serializer support.
  • Works with Laravel Dependency Injection and IoC Container.
  • Provides a DataTable Html Builder to help you use the package with less code.
  • Provides XSS filtering function to optionally escape all or specified column values using escapeColumns('*'\['column']) method.
  • Provides Query Logging when application is in debug state. Important: Make sure that debug is set to false when your code is in production
  • Easily attach a resource on json response via ->with() method.
  • Built-in support for exporting to CSV, EXCEL and PDF using Laravel-Excel.
  • Built-in printer friendly view or create your own by overriding printPreview() method.
  • Provides an artisan command for generating a DataTable service and scope.
  • See change logs for more details.

Requirements:

Laravel 4.2 & DataTables v1.9.x Users

Most of the latest updates/features are not available on these versions. Please check L4 Branch and L5 DT1.9 for old documentations of its features.

Buy me a beer

Documentations

Quick Installation

composer require rafaelqm/laravel-datatables:~6.0

Service Provider

Rafaelqm\Datatables\DatatablesServiceProvider::class

Facade

Datatables facade are automatically registered as an alias for Rafaelqm\Datatables\Datatables class.

Configuration and Assets

$ php artisan vendor:publish --tag=datatables

And that's it! Start building out some awesome DataTables!

Upgrading from v5.x to v6.x

  • Change all occurrences of rafaelqm\Datatables to Rafaelqm\Datatables. (Use Sublime's find and replace all for faster update).
  • Remove Datatables facade registration.
  • Temporarily comment out Rafaelqm\Datatables\DatatablesServiceProvider.
  • Update package version on your composer.json and use rafaelqm/laravel-datatables: ~6.0
  • Uncomment the provider Rafaelqm\Datatables\DatatablesServiceProvider.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email aqangeles@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.