Documentation version
v4 (master)
v2 (v2-master)
v1 (v1)
Documentation page
Introduction
Support Me
Questions and Issues
Changelog
Upgrade Guide
Requirements
Recommended
Installation
Including Assets
Commands
Configuration
Rendering
Creating Components
The Query
Configuration
Common Issues
Available Methods
Events
Configurable Areas
Loaders
Query String
Styling
Creating Columns
Relationships
Available Methods
Other Column Types
Column Selection
Secondary Header
Footer
Reusable Columns
Anonymous Columns
Styling
Standard Column
Array Columns (beta)
Avg Columns (beta)
Boolean Columns
Button Group Columns
Color Columns
Component Columns
Count Columns (beta)
Date Columns
Icon Columns (beta)
Image Columns
Increment Column (beta)
Link Columns
Livewire Component (beta)
Sum Columns (beta)
View Component Columns
Wire Link Column (beta)
Clickable Rows
Available Methods
Available Methods
Available Methods
Introduction
Creating Bulk Actions
Processing Bulk Actions
Available Methods
Styling
Introduction
Creating Filters
Applying Filters
Available Methods
Available Component Methods
Available Filter Methods
Filter Pills
Introduction
Boolean Filters (beta)
Date Filters
DateRange Filters
DateTime Filters
Multi-Select Dropdown Filters
Multi-Select Filters
NumberRange Filters
Number Filters
Select Filters
Text Filters
Livewire Custom Filter (Beta)
Livewire Custom Array Filter (Beta)
Introduction
Setup
Saving
Available Methods
Available Methods
Styling
Available Methods
Styling
Basic Example
Advanced Example
Bulk Action Export
Refreshing
Loading Placeholder
Multiple Tables Same Page
Actions (beta)
Adding Custom Markup
Debugging
Saving Table State
Lifecycle Hooks
Hiding The Table (beta)
One Of Many Example
Tools
Sponsor: Introduction
Sponsor: Best Practices
Sponsor: Troubleshooting
Sponsor: Accessibility
Re-using attributes across tables
Performance Optimization
Advanced Filtering
Bulk Actions
Complex Relationships
Custom Column Types
Testing Table Components
Package Integrations
Theming and Customization
Real-Time Updates
Multi-Tenancy Patterns
Advanced Query Patterns
Basic Modal Example
Clicking a row to edit in a modal
Export Functionality
Real-World Example: E-Commerce Orders Table
Admin Dashboard Table
On this page
Rendering Components
Theme
Using sub-folders
Passing Properties
You are reading documentation for v4 .
Switch versions from the documentation menu. Check the installed version with:
composer show rappasoft/laravel-livewire-tables
# Rendering Components
You render components the same way you render any Livewire component.
Your component at App\Livewire\UsersTable.php
1 < livewire:users-table />
# Theme
By default, all components will use the theme in the config file. But if for some reason you have different parts of your application using different frameworks, you can set the theme on a per-table basis:
1 < livewire:users-table theme = " bootstrap-4 " />
# Using sub-folders
If your component does not live in App\Livewire, you can specify a different sub-folder. For example if your component lives in App\Livewire\Backend\Users you would use the following:
1 < livewire:backend.users.users-table />
# Using non-standard locations
If for example you are using Domain Driven Development and you would like your component to live in App\Domains\Auth\Users, then you would register your component in a service provider so Livewire knows how to find it.
For example in LivewireServiceProvider:
1 use Livewire \ Livewire ;
2 use App \ Domains \ Auth \ Users \ UsersTable ;
3
4 public function boot (): void
5 {
6 Livewire :: component ( ' backend.users.users-table ' , UsersTable :: class );
7 }
1 < livewire:backend.users.users-table />
# Passing Properties
Just like in standard Livewire components, you may pass properties and accept them in your mount method:
1 < livewire:invoices-table status = " open " />
1 // Available as $this->status in datatable class or $status in views (if necessary)
2 public string $ status ;
3
4 // Optional, but if you need to initialize anything
5 public function mount ( string $ status ): void {}