Download the PHP package aristonis/laravel-livewire-dataview without Composer
On this page you can find all versions of the php package aristonis/laravel-livewire-dataview. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aristonis/laravel-livewire-dataview
More information about aristonis/laravel-livewire-dataview
Files in aristonis/laravel-livewire-dataview
Package laravel-livewire-dataview
Short Description this package manage livewire components to show set of item and handle quering of database
License MIT
Informations about the package laravel-livewire-dataview
Laravel Livewire Dataview
Laravel Livewire Dataview is a developer-focused toolkit for building SOLID-friendly data listing experiences in Livewire 3. It standardises how you configure queries, pagination and row rendering while keeping your components expressive and testable.\ see docs
Features
- Opinionated abstract component (
DataViewComponent) that centralises pagination, queries and rendering. - Strongly validated traits for query definitions, pagination configuration and per-item views.
- Default Blade view that wires your per-item Livewire components and pagination links.
dataview:makeartisan command to scaffold a DataView component plus optional item component and Blade view.- Config publishing for project-wide defaults (
config/dataview.php) and reusable stubs for custom scaffolding.
Requirements
- PHP 8.2+
- Laravel 10.x or 11.x with Livewire 3.6+
- Composer and Node tooling if you plan to style the bundled Blade view
Installation
Optionally publish the package assets:
Quick start
-
Scaffold a dataview plus item component:
-
Edit the generated component so it extends
Aristonis\LaravelLivewireDataview\DataViewComponentand configure the query, pagination and item view: -
The generated Blade view (
resources/views/livewire/users/user-table-item.blade.php) receives each item through theitemprop. You can customise the markup as you see fit. - Render the dataview in any Blade template:
The default package view (aristonis-dataview::livewire.dataview) loops through your collection and renders the configured item component with stable Livewire keys, then shows pagination links when the query returns a paginator.
Configuration
config/dataview.php controls the base behaviour:
pagination.per_page: global default for$this->getPerPage().pagination.enable: you can toggle pagination at runtime withenablePagination()/disablePagination().item.keyName: used when generating Livewire keys; override via$this->setKeyName('uuid').
Every component can override these defaults inside configure() to keep component logic predictable and SOLID.
Testing
The test suite relies on Orchestra Testbench. Please ensure new functionality is accompanied by unit or feature coverage.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details on our workflow and coding standards.
License
The MIT License (MIT). Please see LICENSE for more information.