PHPackages                             heddiyoussouf/sequential-attribute-guard - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. heddiyoussouf/sequential-attribute-guard

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

heddiyoussouf/sequential-attribute-guard
========================================

A Laravel package that ensures model attribute values follow a specified sequential order during creation or updates.

1.0.0(2y ago)0915PHPPHP ^8.0

Since Sep 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/HeddiYoussouf1/sequential-attribute-guard)[ Packagist](https://packagist.org/packages/heddiyoussouf/sequential-attribute-guard)[ RSS](/packages/heddiyoussouf-sequential-attribute-guard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Sequential Attribute Guard
==========================

[](#sequential-attribute-guard)

Description:
------------

[](#description)

The Sequential Attribute Guard is a Laravel package that provides a powerful and flexible way to manage sequential attributes and their rules for your Eloquent models. With this package, you can easily define multiple sequential attributes for your models, each having its own set of rules for attribute value ordering.

Key Features:
-------------

[](#key-features)

```
Define and manage multiple sequential attributes for your Eloquent models.
Configure sequential attribute rules to control the allowed order of attribute values.
Ensure data integrity and consistency by enforcing sequential rules during model creation and updates.
Simplify complex data management scenarios by using a straightforward and expressive syntax.

```

Installation:
-------------

[](#installation)

To install the Sequential Attribute Guard package, follow these simple steps:

**Install the package via Composer:**

```
bash

composer require heddiyoussouf/sequential-attribute-guard

```

Usage:
------

[](#usage)

Define your Eloquent model and implement the ChecksSequentialAttributeOrder interface.

```
php

use Heddiyoussouf\SequentialAttributeGuard\Interfaces\ChecksSequentialAttributeOrder;
use Heddiyoussouf\SequentialAttributeGuard\Traits\EnforcesSequentialAttributes;

class YourModel extends Model implements ChecksSequentialAttributeOrder
{
    use EnforcesSequentialAttributes;

    // Define your model attributes and their rules here.
}

```

Define your sequential attributes and their rules within the model using the sequentialAttributes and attributeRules methods.

```
php

public static function sequentialAttributes(): array
{
    return ['attribute1', 'attribute2'];
}

public static function attributeRules(): array
{
    return [
        'attribute1' => [
            'value0" => null                         // value0 initial value of attribute1
            'value1' => ['value2', 'value3'],        // value1 comes only after value2 or value3
            'value2' => ['value1'],
            // Define rules for 'attribute1' here.
        ],
        'attribute2' => [
            // Define rules for 'attribute2' here.
        ],
    ];
}

```

Now, your model is equipped with sequential attributes and their defined rules, ensuring that data adheres to the specified order when created or updated.

Requirements:
-------------

[](#requirements)

```
PHP >= 8.0
Laravel >= 8.0

```

Explore the Sequential Attribute Guard package and take control of managing sequential attributes and their rules effortlessly in your Laravel applications.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

976d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a22eed67b910f51fa0698a481a65a8bd98408b749771bcbb55a143ccc0881f0e?d=identicon)[heddiyoussouf](/maintainers/heddiyoussouf)

---

Top Contributors

[![HeddiYoussouf1](https://avatars.githubusercontent.com/u/105787447?v=4)](https://github.com/HeddiYoussouf1 "HeddiYoussouf1 (2 commits)")

### Embed Badge

![Health badge](/badges/heddiyoussouf-sequential-attribute-guard/health.svg)

```
[![Health](https://phpackages.com/badges/heddiyoussouf-sequential-attribute-guard/health.svg)](https://phpackages.com/packages/heddiyoussouf-sequential-attribute-guard)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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