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

ActiveLibrary

gleisonnanet/ordination
=======================

02PHP

Since Dec 26Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Ordination
==========

[](#ordination)

[![Latest Stable Version](https://camo.githubusercontent.com/4002ed67aa2baf45a8165f2acab09231abe664d028c20bcf9cfa50e86f4bf0be/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6f7264696e6174696f6e2f762f737461626c65)](https://packagist.org/packages/gleisonnanet/ordination) [![Total Downloads](https://camo.githubusercontent.com/6021d5320a13cfef266156df6cb45397daf4865c9721b1fe42f877d0820bd0c4/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6f7264696e6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/gleisonnanet/ordination) [![Latest Unstable Version](https://camo.githubusercontent.com/e2e47469a00f6e562242c070bf07ccb0e863746f10e9b6a63282e5a37ee43c2d/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6f7264696e6174696f6e2f762f756e737461626c65)](https://packagist.org/packages/gleisonnanet/ordination) [![License](https://camo.githubusercontent.com/de634319cbb702e174faeb13eb737ac68be555c0637039c0cb31f3e8c581d2df/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6f7264696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/gleisonnanet/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 gleisonnanet/ordination
```

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

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

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

// file END ommited
```

Adicione a trait `OrdinationTrait` no model:

```
use gleisonnanet\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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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/4deaf39aa524bb7afb6c5753541d78e07150bf68eb4239de3aa2505d152db6a7?d=identicon)[gleisonnanet](/maintainers/gleisonnanet)

---

Top Contributors

[![gleisonnanet](https://avatars.githubusercontent.com/u/3974987?v=4)](https://github.com/gleisonnanet "gleisonnanet (10 commits)")

### Embed Badge

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

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

PHPackages © 2026

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