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.
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
{{ ... }} SQL blocks driven by parametersHow can I help you explore Laravel packages today?