PHPackages                             ht3aa/has-relations - 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. ht3aa/has-relations

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

ht3aa/has-relations
===================

A Filament action to display related records

v1.3.0(1y ago)110BladePHP ^8.1

Since May 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ht3aa/has-relations-filament)[ Packagist](https://packagist.org/packages/ht3aa/has-relations)[ RSS](/packages/ht3aa-has-relations/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

Has Relations Action for Filament
=================================

[](#has-relations-action-for-filament)

A Filament action to display related records in a modal.

Demo
----

[](#demo)

Screenshot
----------

[](#screenshot)

[![Has Relations Action Screenshot](demo.png)](demo.png)

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

[](#installation)

You can install the package via composer:

```
composer require ht3aa/has-relations
```

Usage
-----

[](#usage)

In your Filament resource, use the action like this:

```
use Ht3aa\HasRelations\Actions\HasRelations;

public static function table(Table $table): Table
{
    return $table
        ->actions([
            HasRelations::make()
                ->relations([
                    'posts' => [
                        'resource' => PostResource::class,
                        'columns' => ['title', 'slug', 'published_at'],
                    ],
                ]),
        ]);
}
```

Important Note
--------------

[](#important-note)

**Eager Loading Required**: Before using this action, make sure to eager load the relations in your resource's query. This prevents N+1 query issues and ensures optimal performance.

Example of eager loading in your resource:

```
public static function getEloquentQuery(): Builder
{
    return parent::getEloquentQuery()
        ->with(['relation_name']);
}
```

Features
--------

[](#features)

- Displays related records in a modal
- Supports multiple relations
- Customizable columns for each relation
- Localized messages (English and Arabic supported)
- Responsive table layout

Translation
-----------

[](#translation)

The package comes with English and Arabic translations. To publish and customize the translations, run:

```
php artisan vendor:publish --provider="Ht3aa\HasRelations\HasRelationsServiceProvider" --tag="has-relations-translations"
```

This will copy the translation files to:

- `lang/vendor/has-relations/en/translations.php`
- `lang/vendor/has-relations/ar/translations.php`

You can then modify these files to customize the translations for your application.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance45

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

7

Last Release

422d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/96876427?v=4)[Hassan Tahseen](/maintainers/ht3aa)[@ht3aa](https://github.com/ht3aa)

---

Top Contributors

[![ht3aa](https://avatars.githubusercontent.com/u/96876427?v=4)](https://github.com/ht3aa "ht3aa (12 commits)")

### Embed Badge

![Health badge](/badges/ht3aa-has-relations/health.svg)

```
[![Health](https://phpackages.com/badges/ht3aa-has-relations/health.svg)](https://phpackages.com/packages/ht3aa-has-relations)
```

###  Alternatives

[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M25](/packages/ysfkaya-filament-phone-input)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)

PHPackages © 2026

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