PHPackages                             if4lcon/laravel-clear-orders-by - 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. [Database &amp; ORM](/categories/database)
4. /
5. if4lcon/laravel-clear-orders-by

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

if4lcon/laravel-clear-orders-by
===============================

Clear orders by in Laravel query builder

1.03(6y ago)1516.1k5MITPHP

Since Aug 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/awssat/laravel-clear-orders-by)[ Packagist](https://packagist.org/packages/if4lcon/laravel-clear-orders-by)[ RSS](/packages/if4lcon-laravel-clear-orders-by/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

> Archived since Laravel 7 now support `reorder` internally [see: reinink PR](https://github.com/laravel/framework/pull/32186)

Laravel clear "orders" by
=========================

[](#laravel-clear-orders-by)

clear query builder orders

Usage
-----

[](#usage)

```
->clearOrdersBy()
```

if you're using too many relations or using built in laravel realtions that using order by and you don't want them use :

```
$model
->selectRaw('count(*) as MYORDER')
->where('name', 'Bader')
->clearOrdersBy()
->orderBy('MYORDER', 'desc')
```

```
auth()->user()->notifications()
->selectRaw('count(*) as MYORDER')
->clearOrdersBy()
->orderBy('MYORDER', 'desc')
```

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

[](#installation)

`composer require if4lcon/laravel-clear-orders-by`

Then add this line `Bader\ClearOrdersBy\ClearOrdersByServiceProvider::class` to service providers in `config/app.php`.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~264 days

Total

4

Last Release

2457d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d1839100c9cfd19f7ae04492a1c0b08c09e0956479f7a1dc4006de315c0f62e?d=identicon)[if4lcon](/maintainers/if4lcon)

![](https://avatars.githubusercontent.com/u/114794?v=4)[abdulrahman](/maintainers/abdumu)[@abdumu](https://github.com/abdumu)

---

Top Contributors

[![BSN4](https://avatars.githubusercontent.com/u/199647?v=4)](https://github.com/BSN4 "BSN4 (18 commits)")[![simondotwhite](https://avatars.githubusercontent.com/u/793770?v=4)](https://github.com/simondotwhite "simondotwhite (4 commits)")

---

Tags

clear-orderseloquentlaravelphpquery-buildersqllaravelbuilderordersclearorderby

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/if4lcon-laravel-clear-orders-by/health.svg)

```
[![Health](https://phpackages.com/badges/if4lcon-laravel-clear-orders-by/health.svg)](https://phpackages.com/packages/if4lcon-laravel-clear-orders-by)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.4M2](/packages/glushkovds-phpclickhouse-laravel)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

438834.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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