PHPackages                             armincms/chain - 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. armincms/chain

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

armincms/chain
==============

A Laravel Nova field.

0.4.2(5y ago)832.0k3[2 PRs](https://github.com/armincms/chain/pulls)3MITPHPPHP &gt;=7.1.0

Since Oct 12Pushed 5y agoCompare

[ Source](https://github.com/armincms/chain)[ Packagist](https://packagist.org/packages/armincms/chain)[ RSS](/packages/armincms-chain/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (3)

chain
=====

[](#chain)

Conditionally load a field with the value of the other fields.

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

[](#installation)

Via composer: `composer require armincms/chain`.

Usage
-----

[](#usage)

The Chain field works as a `trigger` and `listener`. a `trigger` chain listens to the update events of entire fields and the `listener` chain listening to the `trigger` Chain events and its entire fields together.

Make trigger field
==================

[](#make-trigger-field)

The ` trigger` Chain initializes via the `as` method. the `as` method accepts two arguments. the first argument is the name of `event` and the second argument is a `fields` callback. it receives a request instance for resolving fields.

```
        Chain::as('name', function() {
            return [
                Text::make('Name')
                    ->sortable()
                    ->rules('required', 'max:255'),

                Text::make('Username')
                    ->sortable()
                    ->rules('required', 'max:255'),
            ];
        }),

```

Make listener field
===================

[](#make-listener-field)

The `listener` Chain initializes via the `with` method. the `with` method accepts `an array of events` as the first argument and a callback for the fields as second arguemnt. for listening to a `trigger` Chain you should pass the `name` of the Chain as the `event` name. for listening to a field of a `trigger` Chain you can `prefix the field name by the Chain name` and listen to it. for example, you can listen to the `name` field of a Chain (Chain field named by the 'test'), with the `test.name` event.

```
        Chain::with('name', function($request) {
            if($request->filled('username')){
                return [
                    Text::make('Password')
                        ->sortable()
                        ->rules('required', 'max:255'),

                    Text::make('Confirmation')
                        ->sortable()
                        ->rules('required', 'max:255'),
                ];
            }

            return [];
        }, 'second-chain'),

        Chain::with('second-chain.confirmation', function($request) {
            return [
                Boolean::make('Passed')
                  ->readonly()
                  ->withMeta(['value' => 1]),
            ];
        }),

```

[![](/chain.gif)](/chain.gif)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity43

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

Every ~6 days

Total

6

Last Release

2012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/188c6af1615930311adb86de0f0f1e9241b3306d8f7680c385caa6aa0810ca48?d=identicon)[zareismail](/maintainers/zareismail)

---

Top Contributors

[![zareismail](https://avatars.githubusercontent.com/u/23401061?v=4)](https://github.com/zareismail "zareismail (15 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/armincms-chain/health.svg)

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

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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