Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codedge/livewire-companion

A Laravel Livewire set of components for building datables and more.
https://github.com/codedge/livewire-companion

datatable datatables laravel laravel-livewire laravel-package livewire livewire-tables

Last synced: 3 months ago
JSON representation

A Laravel Livewire set of components for building datables and more.

Awesome Lists containing this project

README

        

[![Latest Stable Version](https://poser.pugx.org/codedge/livewire-companion/v/stable)](https://packagist.org/packages/codedge/livewire-companion)
[![License](https://poser.pugx.org/codedge/livewire-companion/license)](https://packagist.org/packages/codedge/livewire-companion)
[![Total Downloads](https://poser.pugx.org/codedge/livewire-companion/downloads)](https://packagist.org/packages/codedge/livewire-companion)
[![StyleCI](https://github.styleci.io/repos/236844417/shield?branch=master)](https://github.styleci.io/repos/236844417)

# Livewire Companion

[_Livewire Companion_](https://www.livewire-companion.tech) is a set of components based on [Laravel Livewire](https://laravel-livewire.com/), to get you quickly
up and running for recurring tasks.

## Included components

All components use the brilliant [Tailwind CSS](https://tailwindcss.com/). :rocket:


**Currently included components are:**

* Datatable
* Search over one column
* Sorting of columns
* Pagination
* Indicators for pages and total records
* Items per page

![Datataböe](./docs/datatable-screen.png)

* Map (_coming soon_)

## How to install

You can install the package via composer:

```bash
$ composer require codedge/livewire-companion
```

The package will automatically register itself. Then publish the assets (configuration and templates):

```bash
$ php artisan vendor:publish --provider="Codedge\LivewireCompanion\LivewireCompanionServiceProvider"
```

This is going to publish all templates to `resources/views/vendor/livewire-companion`. Feel free to modify to your needs.

## How to use

### Datatables

The datatable component support both, [Eloquent collections](https://laravel.com/docs/5.8/eloquent-collections)
and [Support collections](https://laravel.com/docs/5.8/collections).

Create a new file at `app/Http/Livewire/MyTable.php`:

```php