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

ActiveLibrary

laraerp/ordination
==================

v1.0.4(10y ago)82.5k2[1 PRs](https://github.com/laraerp/ordination/pulls)MITPHPPHP &gt;=5.4.0

Since Apr 14Pushed 6y ago3 watchersCompare

[ Source](https://github.com/laraerp/ordination)[ Packagist](https://packagist.org/packages/laraerp/ordination)[ Docs](http://laraerp.org)[ RSS](/packages/laraerp-ordination/feed)WikiDiscussions 1.0 Synced 1mo ago

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

Ordination
==========

[](#ordination)

[![Latest Stable Version](https://camo.githubusercontent.com/a8c11c2620e96ae524e4f6447fe0a424e3910ab166033e45fe20284ce12d3ff2/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616572702f6f7264696e6174696f6e2f762f737461626c65)](https://packagist.org/packages/laraerp/ordination) [![Total Downloads](https://camo.githubusercontent.com/717d92188107e03a9ac733a89e831186c804ce7aa059410cd925a29ed64930f4/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616572702f6f7264696e6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/laraerp/ordination) [![Latest Unstable Version](https://camo.githubusercontent.com/d0a654b15b519d812baf0f59278fb92e1d9e2c7d50083de1a3c15d5b4849119a/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616572702f6f7264696e6174696f6e2f762f756e737461626c65)](https://packagist.org/packages/laraerp/ordination) [![License](https://camo.githubusercontent.com/dd93f8bda25a89f4f9f9ae53d3b59770770de35d935b1e5f36f1ae3b02d2b5cc/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616572702f6f7264696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/laraerp/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 laraerp/ordination
```

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

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

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

// file END ommited
```

Adicione a trait `OrdinationTrait` no model:

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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~32 days

Recently: every ~38 days

Total

6

Last Release

3881d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3134214?v=4)[Jansen Felipe](/maintainers/jansenfelipe)[@jansenfelipe](https://github.com/jansenfelipe)

---

Top Contributors

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

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/laraerp-ordination/health.svg)](https://phpackages.com/packages/laraerp-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)
