PHPackages                             kyrax324/laravel-queriplex - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kyrax324/laravel-queriplex

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kyrax324/laravel-queriplex
==========================

A simple package to help building query builder between request inputs and allowed rules.

v2.0.1(3y ago)32.9k↓50%1MITPHPPHP &gt;=7.2

Since Apr 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Kyrax324/laravel-queriplex)[ Packagist](https://packagist.org/packages/kyrax324/laravel-queriplex)[ RSS](/packages/kyrax324-laravel-queriplex/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (7)Used By (0)

Laravel Queriplex
=================

[](#laravel-queriplex)

A simple package to help building query builder between request inputs and allowed rules.

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

[](#installation)

```
composer require kyrax324/laravel-queriplex
```

Usage
-----

[](#usage)

### Generating Queriplex Classes

[](#generating-queriplex-classes)

Generate a queriplex class for `User` model

```
php artisan make:queriplex UserQueriplex
```

\*\* You may also publish the stub template file for customize purpose.

```
php artisan queriplex:publish-stub
```

### Setup Filter &amp; Sort Rules

[](#setup-filter--sort-rules)

Fill up the necessarily filtering and sorting rules in the `UserQueriplex.php`

Example:

```
public $sortingKey = "sortBy"; // #1

public function filterRules()
{
	return [
		// with callback function
		'country' => function($query, $value){
			$query->where("country_code", $value);
		},
		// with shortcut alias
		'country' => 'country_code', // when isset 'country', where "country_code" = $value
	];
}

public function sortRules()
{
	return [
		"alphabet_asc" => fn ($query) => $query->orderBy('name', "ASC"),
		"alphabet_desc" => fn ($query) => $query->orderBy('name', "DESC"),
		"latest" => fn ($query) => $query->orderBy('created_at', "DESC"),
	];
}
```

Use Case Example
----------------

[](#use-case-example)

To get a result of users where country\_code = "ABC" order by latest created time

`UserController.php`

```
use App\Queriplex\UserQueriplex;

...

// payload from request->validated()
$payload = [
	"country" => "ABC", // similar to when(isset(payload['country']), $callback)
	"sortBy" => "latest", // sortingKey #1
];

$query = User::query();
$query = UserQueriplex::make($query, $payload);

$result = $query->get();

/**
 * As result,
 * filter rule "country_code" & sort rule "latest" will be applied
 *
 * SQL Statement:
 * SELECT * from `users`
 * WHERE `country_code` = "ABC"
 * ORDER BY `created_at` DESC
 */
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~114 days

Recently: every ~0 days

Total

6

Last Release

1269d ago

Major Versions

v1.0.0-beta.1 → v2.0.02022-11-20

v1.x-dev → v2.0.12022-11-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e578141f87b614198736dc428f34e11c46cf8f822fbca9d0c5d83d0e824597b?d=identicon)[kyrax324](/maintainers/kyrax324)

---

Top Contributors

[![Kyrax324](https://avatars.githubusercontent.com/u/72662771?v=4)](https://github.com/Kyrax324 "Kyrax324 (7 commits)")

---

Tags

laravelhelperquery builderqueriplex

### Embed Badge

![Health badge](/badges/kyrax324-laravel-queriplex/health.svg)

```
[![Health](https://phpackages.com/badges/kyrax324-laravel-queriplex/health.svg)](https://phpackages.com/packages/kyrax324-laravel-queriplex)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[cartalyst/support

Support helpers.

762.8M14](/packages/cartalyst-support)

PHPackages © 2026

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