diff --git a/README.md b/README.md index e68cc13..c936ff5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,532 @@ -# generic_table_examples +# Generic Table: Laravel+Livewire package to automatize HTML tables -Ejemplos prácticos de creación de tablas dinámicas usando el paquete `generic_tables` \ No newline at end of file +## Introduction +Generic Table is a package that makes working with tables in Laravel + Livewire easier. It was developed with performance in mind. The main reason behind the project is working with the interface design pattern to segregate responsibilities. From my perspective, table logic should be in its own place. + + +## Requirements +1. PHP 8.4 +2. Laravel >= 11.x +3. Livewire >= 3.x +4. Bootstrap 5.x + +## How to install +`composer require mmt/generic_table` + +## Features +- Drag and drop rows to simplify reordering. (using [Dragula Js][1]) +- Classic column reordering. +- Bind the entire column to a laravel route. +- Create action columns. Customize them using blade views +- Filter by mutually exclusive or inclusives values. +- Search by any column +- Use relationships on columns to link the column with a relationship value. +- and more... + +## Basic Usage +### First, the `Generic Table Definition` +With the following code snippet your are creating the table definition that you +will later will pass to the blade directive `@generic_table()`. +```php + \App\Tables\ProductTable::class]); +} +// ... +``` +Then, in the view use the `@generic_table()` directive as follows: +```html +