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
Magic Query

Magic Query Laravel Package

mouf/magic-query

Magic Query lets PHP developers describe SQL queries in JSON instead of hand-written strings, then compiles them into parameterized SQL with joins, unions and filters handled automatically. This reduces injection risk and makes complex queries easier to build, reuse and maintain across projects.

View on GitHub
Deep Wiki
Context7

Mouf Magic Query is a PHP library for turning reusable SQL templates into dynamic queries. It parses a lightweight magic syntax inside SQL—conditional fragments, optional filters, ordering, and pagination—so one query adapts to many parameter sets without manual string concatenation. It integrates with Doctrine DBAL and the Mouf/TDBM ecosystem, while remaining usable in standalone PHP projects.

Features

  • Optional {{ ... }} SQL blocks driven by parameters
  • Safe, DBAL-backed parameter binding
  • Dynamic filtering, sorting, and limit/offset
  • Reusable query templates for repositories and APIs
  • Compatible with Mouf and TDBM
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core