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

Laravel Eloquent Case Laravel Package

aglipanci/laravel-eloquent-case

Add case-insensitive where clauses to Laravel Eloquent. This package provides simple, chainable whereCaseInsensitive and orWhereCaseInsensitive methods so you can query models without worrying about letter case, avoiding raw SQL and keeping your code clean and readable.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature delivery: Enables conditional SQL logic (CASE WHEN) directly in Eloquent queries, useful for dynamic sorting, priority ordering, tiered pricing, status-based bucketing, and computed columns without raw SQL.
  • Roadmap & portability: The 5.1.0 grammar-aware SQL generation removes a MySQL-only assumption, making the package viable for products that support PostgreSQL, SQL Server, or SQLite — reducing database lock-in and supporting multi-tenant or on-prem deployments.
  • Build vs. buy: Adopt instead of building and maintaining custom query-builder extensions for CASE expressions. Low integration cost, active maintenance, and a focused API.
  • Risk reduction: Avoids subtle bugs from hand-written raw SQL quoting that breaks on non-MySQL grammars; improves confidence in cross-database test coverage.

When to Consider This Package

  • You need CASE expressions in Eloquent for sorting, filtering, or computed fields and want a clean, database-agnostic API.
  • Your application targets multiple database engines (especially after 5.1.0) or may migrate away from MySQL.
  • You want to avoid raw SQL fragments for conditional logic to improve maintainability and testability.
  • Look elsewhere if: you need complex window functions, heavy reporting/analytics (consider dedicated query builders or database views), or you are on a single database and are comfortable with raw expressions. Also evaluate if package maintenance cadence is a concern for long-lived products.

How to Pitch It (Stakeholders)

  • Executives: A small, low-risk dependency that accelerates delivery of conditional-logic features and reduces database lock-in, supporting broader customer deployments without custom engineering.
  • Engineering: Provides a clean Eloquent API for CASE expressions; 5.1.0 respects Laravel’s active database grammar instead of assuming MySQL quoting, eliminating a class of cross-database bugs and making it safe for multi-DB projects.
  • Product: Enables faster iteration on features like priority sorting, dynamic pricing tiers, and status-based views, with lower maintenance overhead than bespoke query extensions.
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.
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
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log