Skip to content

MauroB45/EloquentDatatables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EloquentDataTables Package

Library to easily integrate jQuery DataTables in server side mode with Laravel. To check the DataTables docs: https://datatables.net

This package provide a nice interface to capture and use the request object sent by DataTables to build the Eloquent query dinamically. By doing this the information retreived from the DB is paginated, sorted and filtered based on the configuration. The server side mode in DataTable is commonly used when there is a large amount of data and the client rendering time takes a long time to execute.

Install

This package can be installed with Composer running the following command:

  composer require MauroB45\EloquentDatatables

After installing the EloquentDatatables, register the MauricioBernal\EloquentDatatables\EloquentDatatablesServiceProvider in your config/app.php configuration file like:

  'providers' => [
    // ...
    MauroB45\EloquentDatatables\EloquentDatatablesServiceProvider::class
  ],

Use:

The basic usage of the package is

public function getDataTable()
{
	return \Datatables::of("posts")->columns(['name', 'lastname', 'email'])->get();
}

Contributing

Contributions are welcomed; to keep things organized, all bugs and requests should be opened on github issues tab for the main project in Issues.

All pull requests should be made to the 'dev' branch, so they can be tested before being merged into master.

License

The laravel-audit package is open source software licensed under the license MIT

About

Laravel package for jQuery DataTables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages