Weave Code
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

Saring Laravel Package

laraditz/saring

Saring is a simple Eloquent model filtering package for Laravel and Lumen. Add the Filterable trait to models, create per-model filter classes (e.g., UserFilter), optionally whitelist filterable fields, and call Model::filter($request->all()).

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development: Enables rapid implementation of search/filter functionality for Eloquent models without reinventing the wheel. Reduces boilerplate for common filtering use cases (e.g., admin dashboards, public search interfaces).
  • Roadmap Prioritization: Justifies delaying custom query builder development if filtering needs are predictable and reusable across multiple models.
  • Build vs. Buy: Buy—avoids maintaining a bespoke filtering system, especially for teams with limited backend resources or tight deadlines.
  • Use Cases:
    • Admin panels requiring dynamic filtering (e.g., "Filter users by name/email").
    • Public APIs with search endpoints (e.g., e-commerce product filters).
    • Legacy systems needing quick upgrades to support filtering without major refactoring.

When to Consider This Package

  • Adopt when:
    • Your Laravel/Lumen app needs basic to intermediate filtering (e.g., LIKE queries, exact matches, range filters).
    • You’re using Eloquent models and want to avoid raw SQL or complex query scopes.
    • Your team prioritizes developer velocity over ultra-custom filtering logic.
    • You lack a dedicated backend team to build/maintain a filtering system from scratch.
  • Look elsewhere if:
    • You need advanced filtering (e.g., full-text search, geospatial queries, nested relationships).
    • Your data model requires dynamic filters (e.g., user-defined columns at runtime).
    • You’re using non-Eloquent data sources (e.g., raw database connections, external APIs).
    • Your project demands high performance (this package adds minimal overhead but isn’t optimized for large-scale datasets).
    • You already have a mature filtering system (e.g., custom query builder, API like Spatie’s Laravel Query Builder).

How to Pitch It (Stakeholders)

For Executives: "Saring is a lightweight, MIT-licensed Laravel package that lets us add search/filter functionality to our admin tools or public APIs in hours—not weeks. It’s like adding Google Search to any database table with minimal code. For example, we could let support agents filter users by name or email in our dashboard without writing custom queries. It’s a low-risk, high-reward way to improve UX and operational efficiency, especially if we’re already using Laravel. The trade-off? We give up some customization for speed, but the package is simple enough to extend later if needed."

For Engineering: *"This package solves a common pain point: writing repetitive where() clauses for filtering. By using the Filterable trait and defining rules in a dedicated *Filter class, we can:

  • Reduce boilerplate: No more copying/pasting query logic across controllers.
  • Centralize logic: Filters live in one place (App/Filters), making them easier to maintain.
  • Leverage Laravel’s ecosystem: Works seamlessly with Eloquent, Lumen, and existing auth systems.
  • Start small: The MIT license and simple API mean we can iterate or replace it later if needs grow.

Proposal: Use this for MVP filtering needs (e.g., user/admin panels) and evaluate if we need to customize it after launch. It’s a 10-minute setup for a 10x productivity gain."*

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.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme