Download the PHP package evelution87/alpine-tables without Composer
On this page you can find all versions of the php package evelution87/alpine-tables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download evelution87/alpine-tables
More information about evelution87/alpine-tables
Files in evelution87/alpine-tables
Package alpine-tables
Short Description Data tables for Laravel using Alpine JS
License MIT
Homepage https://github.com/evelution87/alpine-tables
Informations about the package alpine-tables
AlpineJS Data Tables for Laravel
This package provides a component for Laravel websites to embed data tables using AlpineJS and Tailwind CSS.
Installation
You can install the package via composer:
The required assets must be published by running:
Usage
Alpine Tables can be enabled for a controller by adding a trait to the controller.
You must include your own version of two functions:
alpineModel()
defines the Laravel model the table will be using.
Replace 'User' with the model the table will be working with.
alpineColumns()
defines the columns that will appear on the table.
(documentation to be added later)
Optional:
alpineSearchColumns()
can be used to define the columns that can be searched. By default it returns a list of all columns defined by alpineColumns()
, but you might want to customise this.
Adding to a View
To insert a table into a view, you can use the <x-alpine-table>
blade component.
-
The
route
attribute defines the AJAX route for loading table data. This route should be defined in yourroutes.php
file. Example: - The (optional)
key
attribute is used when saving settings such as filters to a user's local browser storage. Use a different key for each table to allow different filters to be saved. Alternatively you can use the same key to make the filters function across different tables.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Craig Eve
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
All versions of alpine-tables with dependencies
ext-json Version *
evelution87/heroicons Version ^2.0
laravel/framework Version ^9.0|^10.0|^11.0