Download the PHP package codedge/livewire-companion without Composer
On this page you can find all versions of the php package codedge/livewire-companion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codedge/livewire-companion
More information about codedge/livewire-companion
Files in codedge/livewire-companion
Package livewire-companion
Short Description A library with ready-to-use Laravel Livewire components.
License MIT
Informations about the package livewire-companion
Livewire Companion
Livewire Companion is a set of components based on Laravel Livewire, to get you quickly up and running for recurring tasks.
Included components
All components use the brilliant Tailwind CSS. :rocket:
Currently included components are:
- Datatable
- Search over one column
- Sorting of columns
- Pagination
- Indicators for pages and total records
- Items per page
- Map (coming soon)
How to install
You can install the package via composer:
The package will automatically register itself. Then publish the assets (configuration and templates):
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 and Support collections.
Create a new file at app/Http/Livewire/MyTable.php
:
The Livewire component needs to inherit the Datatable
class. Then make sure you configure the component as you like:
$model
: Specify the model class, mandatory$perPageOptions
: Available options show items per page, default:5, 10, 25
$searchingEnabled
: Enable/Disable searching, default:true
$sortingEnabled
: Enable/Disable sorting, default:true
$template
: Overwrite Datatable template path, default:vendor.livewire-companion.datatable
Contributing
If you miss any component or want to extend functionality and/or fixing bugs - feel free to submit a PR. I happily merge it in.
All versions of livewire-companion with dependencies
livewire/livewire Version ^0.7.0
spatie/laravel-collection-macros Version ^6.0