PHPackages                             kolydart/laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kolydart/laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kolydart/laravel
================

A collection of laravel helper classes

1.2(1mo ago)0633GPL-3.0-or-laterPHPPHP &gt;=7.4

Since Feb 8Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (16)Versions (21)Used By (0)

kolydart/laravel
================

[](#kolydartlaravel)

> **Document Purpose**: Technical documentation for Laravel package providing ordered pivot relationships management tools. Describes installation, usage, and API reference.

A collection of Laravel helper classes including ordered pivot relationships functionality.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Ordered Pivot Relationships](#ordered-pivot-relationships)
    - [Quick Start](#quick-start)
    - [Components](#components)
    - [Usage Examples](#usage-examples)
    - [API Reference](#api-reference)
    - [Migration from Manual Implementation](#migration-from-manual-implementation)
- [Testing](#testing)
- [License](#license)

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

[](#installation)

```
composer require kolydart/laravel
```

The service provider will be automatically registered via Laravel's package auto-discovery.

Ordered Pivot Relationships
---------------------------

[](#ordered-pivot-relationships)

This package provides functionality to maintain order in many-to-many (pivot) relationships. This abstraction allows you to preserve the selection order of related models, which is particularly useful for forms where the order of selection matters.

### Quick Start

[](#quick-start)

#### 1. Create migration for order column:

[](#1-create-migration-for-order-column)

```
php artisan make:ordered-pivot-migration paper_user --order-column=order --after=user_id
```

This creates a migration that adds an `order` column to the `paper_user` pivot table.

#### 2. Update your model:

[](#2-update-your-model)

```
