Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filtan Laravel Package

patienceman/filtan

Filtan is a Laravel package for adding filters to Eloquent queries, letting you define reusable filter classes and apply them to models or requests. It aims to keep query filtering clean and organized, though documentation is limited.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on filtering infrastructure: Filtan is a small, single-purpose abstraction for turning request parameters into Eloquent where clauses. If your roadmap includes several list/index endpoints with ad-hoc filtering, this is a candidate to avoid re-implementing filter parsing in every controller — but it is a buy-and-adopt decision with meaningful maintenance risk (see below), so weigh it against a two-day internal helper or Spatie's laravel-query-builder.
  • API surface scoping for list endpoints: A package like this implicitly defines a contract — filter keys come in as query string parameters, map to a filter class, and get applied to the query. That contract shapes your public API documentation, SDK generation, and backward-compatibility obligations. Adopting it is partly a product decision about how flexible your public filtering API should be.
  • Feature sequencing: If "advanced filtering / saved searches / faceted search" is on the roadmap, a package like Filtan can unblock a v1 quickly. It should not be the foundation for the v2 story — faceted search, relevance, and index-backed filtering will outgrow a where-clause decorator, so plan the migration path before committing.
  • Use cases it plausibly fits: internal admin dashboards, back-office tooling, B2B reporting exports, and early-stage CRUD APIs where the filter set is small, known, and SQL-index-backed.
  • Use cases it does not fit: customer-facing search where latency and relevance matter, multi-tenant filtering with security-sensitive scope enforcement, or anything requiring full-text/semantic search — those need a search index (Meilisearch, Typesense, OpenSearch) rather than query-parameter filtering.

When to Consider This Package

Consider it only if all of the following hold:

  • You're on a Laravel version compatible with the package's last release (2024-11-27) and you've verified it actually installs and passes tests on your version — the release is old enough that Laravel 12+ compatibility is an open question you must check before anything else.
  • Your filtering needs are genuinely simple: a handful of scalar filters per endpoint, no cross-entity joins, no ranking.
  • You're willing to vendor or fork it. With 2 stars and 0 dependents, you are effectively the maintainer. Budget for reading the source, writing your own tests around it, and patching it yourself.
  • The alternative — 100–200 lines of internal Filter base class plus per-resource filter classes — is not obviously cheaper. Be honest: for most teams it is.

Look elsewhere (or build in-house) when:

  • Production-critical path: zero dependents and minimal community signal means no security review surface, no CVE monitoring, no community bug reports. Treat it as untrusted third-party code.
  • You need maintained filtering: prefer spatie/laravel-query-builder (large user base, active maintenance, well-documented) or tucker-eric/eloquentfilter, both of which solve the same problem with far more battle-testing.
  • Security-sensitive filtering: any package that maps user input to query constraints deserves scrutiny for mass-assignment-style abuse (whitelisting filters, preventing column enumeration). You'll want to verify Filtan enforces an allowlist rather than reflecting arbitrary parameters.
  • You need sorting, pagination, includes/relationship loading, or field selection alongside filtering — a broader query-builder package covers those in one dependency.
  • Long-lived product: dependency count is a liability; adding a near-zero-adoption package for a solved problem is hard to justify at review time.

How to Pitch It (Stakeholders)

To executives: Filtan is a small open-source Laravel add-on that standardizes how we build filterable list endpoints — the "filter by status, date, owner" dropdowns in admin and reporting screens. It could save a few days of engineering on the next dashboard project. The catch is that it's essentially unmaintained by the community (2 GitHub stars, no downstream users, last release November 2024), so we'd own it if it breaks. My recommendation is do not take a dependency on it; instead spend the same few days building a thin internal filter layer, or adopt a well-supported equivalent like Spatie's query builder. Either way, we get the same velocity without inheriting maintenance risk.

To engineering: It's a query-parameter-to-Eloquent-filter mapper, similar in shape to Spatie's laravel-query-builder but with effectively no adoption. Before we'd use it we'd need to (1) confirm Laravel version compatibility, (2) audit how it validates and allowlists filter keys against injection and column enumeration, (3) confirm it composes with our existing pagination and authorization scopes, and (4) accept that we fork it and own patches. Compared to a ~150-line internal base filter class with per-model filter objects, the build is cheaper and safer. If the team prefers a package, Spatie's is the defensible choice — this one isn't.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus