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 1mo ago

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 64% of packages

Maintenance49

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5960d0e04603296e1d859501a366241098d1a46c95f0bfc47f0541871b08cfbb?d=identicon)[ht3aa](/maintainers/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

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[datlechin/filament-menu-builder

Create and manage menus and menu items

13550.3k2](/packages/datlechin-filament-menu-builder)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[codewithdennis/filament-lucide-icons

A Filament plugin that integrates Lucide icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.

4529.4k2](/packages/codewithdennis-filament-lucide-icons)

PHPackages © 2026

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