Skip to content

lase-peco/datatables

Repository files navigation

Datatables on steroids 💥

The lase-peco/datatables adds robust and easy to customize datatables build with the Laravel Livewire library.

Note

We are still working on this package to bring new features.

Requirements

Installation

You can install the package via composer:

composer require lase-peco/datatables

Features

All generated datatables has the following features:

  • Column sorting.
  • Pagination.
  • Include specific columns. (optional)
  • Exclude Specific columns. (optional)

... and many new features on the way!

Use

Just add in your "View" the following:

<livewire:datatable model="App\Models\User"/>

Define in the model attribute the Eloquent Model, for which you like to generate the datatable.

The include attribute

You can specify which columns to include in the table and in which order by using the include attribute. Just provide the needed columns seperated with a comma.

<livewire:datatable model="App\Models\User" include="name,email,created_at,id"/>

This will give you a table with the provided columns in the provided order.

The exclude attribute

You can specify which columns to exclude from the table by using the exclude attribute. Just provide the unwanted columns seperated with a comma.

<livewire:datatable model="App\Models\User" exclude="name,id"/>

This will give you a table with all columns form the provided eloquent model except the excluded ones.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email a.dabak@lase-peco.com instead of using the issue tracker.

Credits

License

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

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors