reachweb/statamic-livewire-filters
Composer 安装命令:
composer require reachweb/statamic-livewire-filters
包简介
Livewire filters for Statamic collections.
README 文档
README
Statamic Livewire Filters is an add-on for Statamic that enables you to use Livewire to create "live" filters for your Statamic collections. It comprises a primary Livewire component and various standard filter components, which are designed to be easily editable to suit your project's needs. It allows you to filter your entries by almost any field you wish and display the results in a "live" manner, using the power of Livewire.
Introduction
No Livewire knowledge required
Simply swap out your Statamic collection tag and add the filters using Antlers – you're all set. This addon is designed to be straightforward and accessible, making it a seamless experience whether you're already familiar with Livewire or not.
Ready to use filters
Starting from scratch isn’t fun. You can use the basic filters already included to hit the ground running. Want to change how the look? Piece of cake using TailwindCSS. Want to extend and add more filters? Also possible.
Advanced features
Ready-to-use pagination? Absolutely! Query scopes? You bet! Query string support? Yes sir!
Documentation & Examples
You can find the documentation and examples here: https://livewirefilters.com/
Feature list
Main features:
- Collections Livewire component that, with the help of a Statamic tag, can seamlessly your collection tags using the exact same syntax.
- Simple and customizable filters equipped using the most common controls: Text input, Checkboxes, Radio, Select, Range, and Date.
- Compatibility with most Statamic conditions supported by the collection tag.
- Capability to dynamically order your collection besides filtering.
- Livewire-enabled pagination, prebuilt and ready to use.
- Query scopes support, including a prebuilt query scope for fields saved as an array.
- Query string support for your filters, enhancing usability.
- Minimal styling using TailwindCSS.
- Multiple view options for each component, offering flexibility in presentation.
- No JavaScript required, except for Flatpickr for the Date filter, simplifying integration.
Infinite scroll
Paginated collections can switch from numbered page links to an incremental "load more" flow by adding infinite_scroll="true" to the tag:
{{ livewire-collection:cars view="cars" paginate="12" infinite_scroll="true" }}
Then render the trigger in your view with the {{ livewire-filters:load_more }} tag — the counterpart to {{ links }}:
{{ livewire-filters:load_more }} {{# manual "Load more" button #}}
{{ livewire-filters:load_more auto="true" }} {{# auto-loads on scroll (infinite scroll) #}}
auto="true" wires up Alpine's x-intersect (bundled with Livewire — no build step) so the next page loads as the trigger scrolls into view. Without it, the visitor clicks to load more. Either way it renders a real <button>, so it keeps working without JavaScript.
Each load grows the page size by the initial paginate value, and the size resets automatically whenever a filter or sort changes. The tag hides itself once there are no more pages. The bundled view already includes it; you only add it yourself in custom views.
Optional parameters: text (override the label) and class (button classes). Publish vendor/statamic-livewire-filters/livewire/ui/load-more.antlers.html to fully restyle it.
Note: the loaded-more state lives in the Livewire component, not the URL, so a full page reload resets the list to the first page.
License
When you are ready to deploy to production you need to buy a license at the Statamic Marketplace. Statamic Livewire Filters is not free software.
Issues and pull requests
Feel free to open an issue right here on Github. Email us directly for a security issue: info@reach.gr
reachweb/statamic-livewire-filters 适用场景与选型建议
reachweb/statamic-livewire-filters 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.12k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2024 年 01 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「statamic」 「livewire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 reachweb/statamic-livewire-filters 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 reachweb/statamic-livewire-filters 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 reachweb/statamic-livewire-filters 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Livewire starter kit for Lunar e-commerce.
Statamic Fine Seo addon
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
Livewire component that provides drawers (slide overs) that support multiple children while maintaining state.
Simple Livewire notifications system without any dependencies except TALL-stack.
统计信息
- 总下载量: 13.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2024-01-08