PHPackages                             ngekoding/lumen-api-query-parser-php5 - 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. ngekoding/lumen-api-query-parser-php5

ActiveLibrary[API Development](/categories/api)

ngekoding/lumen-api-query-parser-php5
=====================================

A query parser for REST-APIs based on laravel's lumen framework

116PHP

Since May 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ngekoding/lumen-api-query-parser-php5)[ Packagist](https://packagist.org/packages/ngekoding/lumen-api-query-parser-php5)[ RSS](/packages/ngekoding-lumen-api-query-parser-php5/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lumen API query parser
======================

[](#lumen-api-query-parser)

### !!! I have edit the original package to support php5 !!!

[](#-i-have-edit-the-original-package-to-support-php5-)

The original package go here:

-
-

If you need php5 support, so you can use this package. But if you already using php7, please use the original package.

Description
-----------

[](#description)

This is a simple request query parameter parser for REST-APIs based on Laravel's Lumen framework.

Requirements
------------

[](#requirements)

- PHP &gt;=5.6
- Lumen framework &gt;= 5.4
- Mockery &gt;= 0.9 (dev)
- PHPUnit &gt;= 6.1 (dev)
- PHP CodeSniffer &gt;= 3.0.0 RC4 (dev)

Installation
------------

[](#installation)

- Add ngekoding/lumen-api-query-parser-php5 to your composer.json and make composer update, or composer require ngekoding/lumen-api-query-parser-php5 ~1.0
- Setup the service provider: in bootstrap/app.php add the following line: ```
    $app->register(LumenApiQueryParser\Provider\RequestQueryParserProvider::class);
    ```

Usage
-----

[](#usage)

```
    // app/API/V1/Models/UserController.php
    namespace App\Api\V1\Http\Controllers;

    use App\Api\V1\Models\User;
    use App\Api\V1\Transformers\UserTransformer;
    use LumenApiQueryParser\ResourceQueryParserTrait;
    use LumenApiQueryParser\BuilderParamsApplierTrait;

    class UserController extends Controller
    {
        use ResourceQueryParserTrait;
        use BuilderParamsApplierTrait;

        public function index(Request $request)
        {
            $params = $this->parseQueryParams($request);
            $query = User::query();
            $userPaginator = $this->applyParams($query, $params);

            $this->response->paginator($userPaginator, new UserTransformer, ['key' => 'users']);
        }
    }
```

Query syntax
------------

[](#query-syntax)

### Eager loading

[](#eager-loading)

Q: /users?includes\[\]=profile
R: will return the collection of the users with their profiles included

### Filtering

[](#filtering)

Q: /users?filter\[\]=name:ct:admin
R: will return the collection of the users whose names contains the admin string

**Available filter options**

OperatorDescriptionExamplectString containsname:ct:PeternctString NOT containsname:nct:PeterswString starts withusername:sw:adminewString ends withemail:ew:gmail.comeqEqualslevel:eq:3neNot equalslevel:ne:4gtGreater thanlevel:gt:2geGreater than or equallevel:ge:3ltLesser thanlevel:lt:4leLesser than or equallevel:le:3inIn arraylevel:in:1|2|3### Sorting

[](#sorting)

Q: /users?sort\[\]=name:ASC
R: will return the collection of the users sort by their names ascending

### Pagination

[](#pagination)

Q: /users?limit=10&amp;page=3
R: will return a part of the collection of the users (from the 21st to 30th)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/badefbaef2fd421d3b05261b2eb984562dee50392d83632bdb6549aff655e25e?d=identicon)[ngekoding](/maintainers/ngekoding)

---

Top Contributors

[![ngekoding](https://avatars.githubusercontent.com/u/11625690?v=4)](https://github.com/ngekoding "ngekoding (5 commits)")

### Embed Badge

![Health badge](/badges/ngekoding-lumen-api-query-parser-php5/health.svg)

```
[![Health](https://phpackages.com/badges/ngekoding-lumen-api-query-parser-php5/health.svg)](https://phpackages.com/packages/ngekoding-lumen-api-query-parser-php5)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
