PHPackages                             rodrigogalura/tuner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rodrigogalura/tuner

ActiveLibrary[API Development](/categories/api)

rodrigogalura/tuner
===================

A Laravel package to fine-tune your APIs — let clients shape the data with powerful query modifiers.

v1.3.10(2mo ago)28213MITPHPPHP ^8.3CI passing

Since Sep 16Pushed 2mo agoCompare

[ Source](https://github.com/rodrigogalura/tuner)[ Packagist](https://packagist.org/packages/rodrigogalura/tuner)[ Fund](https://ko-fi.com/rodrigogalura)[ RSS](/packages/rodrigogalura-tuner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (29)Used By (0)

[![tests](https://camo.githubusercontent.com/f99050245420e5899a8936ef2475c1af05cdee398547f91bf69a159e3f28f1d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f647269676f67616c7572612f74756e65722f706573742e796d6c3f6c6162656c3d7465737473)](https://github.com/rodrigogalura/tuner/actions/workflows/pest.yml)[![packagist version](https://camo.githubusercontent.com/71c29ce98fec58e35651da56d188f877fcda1ea1b8ad73020e827b0167161f26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f647269676f67616c7572612f74756e6572)](https://packagist.org/packages/rodrigogalura/tuner)[![license](https://camo.githubusercontent.com/0eeefe3d4cbd9e9a6883f0f46134d397ceaa0fcdd0eff47e85eea83e8c9337e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726f647269676f67616c7572612f74756e6572)](https://packagist.org/packages/rodrigogalura/tuner)[![code quality](https://camo.githubusercontent.com/235d39f294985729c8ca58c1bd9cc41f6705d42b70f59f225efab3c8bb726372/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6564333833646639336565323430313938316638396539613438326332623164)](https://app.codacy.com/gh/rodrigogalura/tuner/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

 [ ![Logo](./art/tuner.png) ](https://github.com/rodrigogalura/tuner) A Laravel package to fine-tune your APIs — let clients shape the data with powerful query modifiers.
 [**Explore the docs »**](https://rodrigogalura.github.io/tuner/docs/installation-guide.html)

 [Report Bug](https://github.com/rodrigogalura/tuner/issues/new?labels=bug&template=bug-report---.md) · [Request Feature](https://github.com/rodrigogalura/tuner/issues/new?labels=enhancement&template=feature-request---.md)

 Table of Contents1. [About The Project](#about-the-project)
2. [Main Features](#main-features)
3. [Roadmap](#roadmap)
4. [Contributing](#contributing)
5. [License](#license)
6. [Contact](#contact)
7. [Buy Me a Coffee](#buy-me-a-coffee)

About The Project
-----------------

[](#about-the-project)

[![Product Name Screen Shot](./art/image.png)](https://rodrigogalura.github.io/tuner/docs/installation-guide.html)

This package was born out of real-world needs in my own projects. I created it to cut down on boilerplate and give frontend consumers more control and flexibility. I’m simply sharing the tools that helped me build faster — and I hope they’ll do the same for you.

---

Main Features
-------------

[](#main-features)

**Projection**
Select only the fields you need instead of retrieving every field.
Available modifiers:

1. `fields` – Include only the specified fields.
2. `fields!` – Exclude the specified fields (opposite effect).

[![Projection demo](./art/fields.gif)](./art/fields.gif)

---

**Sort**
Order results in ascending or descending order.

- Use the `sort` modifier to define one or more sort fields.

[![Sort demo](./art/sort.gif)](./art/sort.gif)

---

**Search**
Filter results based on a search keyword with optional wildcards.

- Use the `search` modifier.

Available wildcards:

1. `*term` – Match at the beginning.
2. `term*` – Match at the end.
3. `*term*` – Match anywhere (flexible).

[![Search demo](./art/search.gif)](./art/search.gif)

---

**Filter**
Go beyond simple search with advanced filtering.
Available modifiers:

1. `filter`
2. `in`
3. `between`

***filter***
Supports relational and arithmetic operators:

- `=` : Equal
- `>` : Greater than
- `=` : Greater than or equal
- `
