PHPackages                             abelaguiar/ordination - 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. abelaguiar/ordination

ActiveLibrary

abelaguiar/ordination
=====================

v1.3(5y ago)09MITPHPPHP ^7.0.0

Since Sep 26Pushed 5y agoCompare

[ Source](https://github.com/abelaguiar/ordination)[ Packagist](https://packagist.org/packages/abelaguiar/ordination)[ RSS](/packages/abelaguiar-ordination/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

Ordination
==========

[](#ordination)

Adiciona ao model Eloquent o recurso de ordenar consulta por models relacionados.

Exemplo:

```
$clientes = Cliente::orderBy('pessoa.nome', 'desc')->get();
```

### Como utilizar

[](#como-utilizar)

Adicione a library

```
$ composer require abelaguiar/ordination
```

Adicione o ServiceProvider no arquivo `config/app.php`

```
// file START ommited
    'providers' => [
        // other providers ommited
        \AbelAguiar\Ordination\OrdinationServiceProvider::class,
    ],

    'aliases' => [
        // other aliases ommited
        'Order' => AbelAguiar\Ordination\Facade::class,
    ],

// file END ommited
```

Adicione a trait `OrdinationTrait` no model:

```
use AbelAguiar\Ordination\OrdinarionTrait;

class Cliente extends Model{

  use OrdinationTrait;

  /*
   * Belong To Pessoa
   */
  public function pessoa(){
      return $this->belongsTo(Pessoa::class);
  }

}
```

### Order::url()

[](#orderurl)

Utilize o helper na sua view para gerar um link de ordenação:

```

      Documento
      Cliente

```

### License

[](#license)

The MIT License (MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 55% 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 ~588 days

Total

4

Last Release

2114d ago

PHP version history (2 changes)1.0.x-devPHP &gt;=5.4.0

v1.1PHP ^7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7860323?v=4)[Abel Aguiar](/maintainers/AbelAguiar)[@abelaguiar](https://github.com/abelaguiar)

---

Top Contributors

[![jansenfelipe](https://avatars.githubusercontent.com/u/3134214?v=4)](https://github.com/jansenfelipe "jansenfelipe (11 commits)")[![abelaguiar](https://avatars.githubusercontent.com/u/7860323?v=4)](https://github.com/abelaguiar "abelaguiar (9 commits)")

### Embed Badge

![Health badge](/badges/abelaguiar-ordination/health.svg)

```
[![Health](https://phpackages.com/badges/abelaguiar-ordination/health.svg)](https://phpackages.com/packages/abelaguiar-ordination)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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