PHPackages                             nevadskiy/laravel-position - 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. nevadskiy/laravel-position

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

nevadskiy/laravel-position
==========================

Arrange Laravel models in a given order.

0.10.0(1y ago)2680.9k—2.4%8MITPHPPHP ^7.2|^8.0CI passing

Since Jun 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/xalaida/laravel-position)[ Packagist](https://packagist.org/packages/nevadskiy/laravel-position)[ Docs](https://github.com/nevadskiy/laravel-position)[ RSS](/packages/nevadskiy-laravel-position/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (0)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)

🔢 Arrange Laravel models in a given order
=========================================

[](#-arrange-laravel-models-in-a-given-order)

[![PHPUnit](https://camo.githubusercontent.com/35f427da2c5d6d6e9ef98cc3dd8d9355e6a6e6f670cb0d87dddd14cd3d400718/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e65766164736b69792f6c61726176656c2d706f736974696f6e2f706870756e69742e796d6c3f6272616e63683d6d6173746572)](https://packagist.org/packages/nevadskiy/laravel-position)[![Code Coverage](https://camo.githubusercontent.com/5d6d0b3fc00c6704d603d4bd747711a4879cf803d82da3bc90389d3b2d473780/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6e65766164736b69792f6c61726176656c2d706f736974696f6e3f746f6b656e3d39583641515159435041)](https://packagist.org/packages/nevadskiy/laravel-position)[![Latest Stable Version](https://camo.githubusercontent.com/bd26e317bcec58e6d793f1aff98cc97e864fa04ac07a4915ac84c7d52d5924b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65766164736b69792f6c61726176656c2d706f736974696f6e)](https://packagist.org/packages/nevadskiy/laravel-position)[![License](https://camo.githubusercontent.com/447c7f1c1de7447be60f97064d93cd67c1b4c27f87457a395448a5776ca45353/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e65766164736b69792f6c61726176656c2d706f736974696f6e)](https://packagist.org/packages/nevadskiy/laravel-position)

✅ Requirements
--------------

[](#-requirements)

- Laravel `7.0` or newer
- PHP `7.2` or newer

🔌 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require nevadskiy/laravel-position
```

🔨 Add positions to models
-------------------------

[](#-add-positions-to-models)

Add the `HasPosition` trait to the models that should have positions:

```
