PHPackages                             syriable/filament-utilities - 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. syriable/filament-utilities

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

syriable/filament-utilities
===========================

Developer tooling for the Syriable Filament ecosystem — translatable resource generators and modular plugin scaffolding.

0.1.3(1mo ago)016↓87.5%[5 PRs](https://github.com/syriable/filament-utilities/pulls)MITPHPPHP ^8.4CI passing

Since Jun 7Pushed 1w agoCompare

[ Source](https://github.com/syriable/filament-utilities)[ Packagist](https://packagist.org/packages/syriable/filament-utilities)[ Docs](https://github.com/syriable/filament-utilities)[ GitHub Sponsors](https://github.com/syriable)[ RSS](/packages/syriable-filament-utilities/feed)WikiDiscussions 5.x Synced 1w ago

READMEChangelog (4)Dependencies (26)Versions (9)Used By (0)

Syriable Filament Utilities
===========================

[](#syriable-filament-utilities)

[![Latest Version on Packagist](https://camo.githubusercontent.com/012f256de2417d7cc07e84280bd15b8fdf6731000ee324c00233bfb23c52725d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7379726961626c652f66696c616d656e742d7574696c69746965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syriable/filament-utilities)[![GitHub Tests Action Status](https://github.com/syriable/filament-utilities/actions/workflows/tests.yml/badge.svg?branch=5.x)](https://github.com/syriable/filament-utilities/actions?query=workflow%3Atests+branch%3A5.x)[![GitHub Code Style Action Status](https://github.com/syriable/filament-utilities/actions/workflows/fix-code-style.yml/badge.svg?branch=5.x)](https://github.com/syriable/filament-utilities/actions?query=workflow%3Afix-code-style+branch%3A5.x)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Developer tooling for the Syriable Filament ecosystem. The package wires custom Artisan generators that scaffold **translatable** Filament resources and module plugins, a **guard-aware** Filament Shield role resource, and a panel plugin that bundles Syriable's translator, activity log, and Shield integrations.

Features
--------

[](#features)

- **`syriable:make-resource`** — drop-in replacement for Filament's resource generator that extends `TranslatableResource` and translatable resource pages instead of Filament's base classes.
- **Module-aware model discovery** — interactive model selection searches Eloquent models under your `modules/` directory.
- **`plugin:resource`** (`CreatePluginCommand`) — scaffolds a Filament panel plugin for an [InterNACHI/modular](https://github.com/InterNACHI/modular) module, auto-discovers its Filament components, and registers the plugin in the module service provider.
- **Custom file generators** — binds Syriable generators into Filament's `make:filament-resource` pipeline so generated code is translation-ready out of the box.
- **`UtilitiesPlugin`** — registers [`TranslatorPlugin`](https://github.com/syriable/filament-translator), [`Activitylog`](https://github.com/syriable/filament-activitylog), and [`FilamentShieldPlugin`](https://github.com/bezhanSalleh/filament-shield) on a panel from a single entry point.
- **Guard-aware `RoleResource`** — extends Filament Shield's role resource with a live `guard_name` selector, per-guard permission matrices, and correct user counts across morph types.

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 12 or 13
- Filament 5.5+
- [`bezhansalleh/filament-shield`](https://github.com/bezhanSalleh/filament-shield) ^4.2
- [`syriable/filament-translator`](https://github.com/syriable/filament-translator) ^1.1
- [`syriable/filament-activitylog`](https://github.com/syriable/filament-activitylog) ^0.1

For `plugin:resource`, your application must use [InterNACHI/modular](https://github.com/InterNACHI/modular) with modules under the path configured in `config/app-modules.php`.

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

[](#installation)

Install the package via Composer:

```
composer require syriable/filament-utilities
```

`UtilitiesServiceProvider` is auto-discovered. Register `UtilitiesPlugin` on every Filament panel that should use the bundled Syriable integrations:

```
use Filament\Panel;
use Syriable\Filament\Plugins\Utilities\UtilitiesPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            UtilitiesPlugin::make(),
        ]);
}
```

`UtilitiesPlugin` registers the custom `RoleResource`, `TranslatorPlugin`, `Activitylog`, and `FilamentShieldPlugin`. You do not need to register those plugins separately when using `UtilitiesPlugin`.

Usage
-----

[](#usage)

### Generate a translatable resource

[](#generate-a-translatable-resource)

Use `syriable:make-resource` (alias: `syriable:resource`) instead of `make:filament-resource`. It accepts the same options as Filament's command — panel selection, soft deletes, separate form/table schema classes, and so on.

```
php artisan syriable:make-resource Buyer --panel=dashboard
```

When no model argument is passed, the command interactively suggests Eloquent models discovered from classes loaded from your `modules/` directory.

Generated classes extend Syriable's translatable bases:

Generated classExtendsResource`TranslatableResource`Create page`TranslatableCreateRecord`Edit page`TranslatableEditRecord`List page`TranslatableListRecords`Model namespaces are resolved relative to the selected resource namespace so module resources reference module models instead of `App\Models`.

After generation, add translation keys under `lang/{locale}/` following the [filament-translator convention](https://github.com/syriable/filament-translator#translation-key-convention). Enable `createMissingTranslationKeys()` during local development to scaffold missing keys automatically.

### `plugin:resource` (`CreatePluginCommand`)

[](#pluginresource-createplugincommand)

Scaffold a Filament panel plugin inside an [InterNACHI/modular](https://github.com/InterNACHI/modular) module:

```
php artisan plugin:resource users
```

ArgumentRequiredDescription`plugin`NoModule directory name (for example, `users`). When omitted, the command interactively suggests directories from your configured modules path.The command reads `config('app-modules.modules_directory')` (default `modules`) and `config('app-modules.modules_namespace')` (default `Modules`) to resolve paths and namespaces.

**What it generates**

For `php artisan plugin:resource users`, the command creates:

```
modules/users/src/UsersPlugin.php

```

with namespace `Modules\Users`. The generated plugin class:

- implements Filament's `Plugin` contract,
- uses the module slug as its plugin ID (`users`),
- discovers resources, pages, and widgets under `Filament/Resources`, `Filament/Pages`, and `Filament/Widgets` relative to the plugin file.

**Service provider registration**

`CreatePluginCommand` also patches the module service provider at `modules/{module}/src/Providers/{Module}ServiceProvider.php`:

- adds the plugin `use` import when missing,
- appends `$panel->plugin(UsersPlugin::make())` to an existing `Panel::configureUsing()` block, or
- creates a new `Panel::configureUsing()` block inside `register()` when none exists.

Re-running the command is safe — it skips registration when the plugin is already present.

Customize the generated plugin by publishing the stub before running the command (see [Publish generator stubs](#publish-generator-stubs)).

### Guard-aware role management

[](#guard-aware-role-management)

The package replaces Filament Shield's default `RoleResource` with a translatable variant that supports multiple authentication guards.

When creating or editing a role, the `guard_name` field is populated from `config('auth.guards')` and updates the permission matrix live. Changing the guard:

- swaps Filament Shield's `resources.exclude` and `policies.methods` config for guard-specific overrides from `config/filament-utilities.php`,
- flushes Shield's cached resource discovery so the permission checkboxes reflect the selected guard,
- prunes stale checkbox state so validation does not fail when switching between guards.

The roles table counts users via the `model_has_roles` pivot directly, so `users_count` is accurate when the same role is assigned to models on different guards (for example, `Admin` and `Buyer`).

Publish and customize the web-guard overrides:

```
php artisan vendor:publish --tag=filament-utilities-config
```

```
use Modules\Users\Filament\Resources\Admins\AdminResource;
use Syriable\Filament\Plugins\Utilities\Filament\Resources\Roles\RoleResource;

return [
    'shield' => [
        'resources' => [
            // Resources hidden from the permission matrix for the 'web' guard.
            'exclude' => [
                RoleResource::class,
                AdminResource::class,
            ],
        ],
        'policies' => [
            // Policy methods available in the permission matrix for the 'web' guard.
            'methods' => ['viewAny', 'view', 'create', 'update'],
        ],
    ],
    // ...
];
```

Non-`web` guards use your application's `config/filament-shield.php` values. Run `php artisan shield:generate` as usual to scaffold permissions and policies for application resources.

### Publish generator stubs

[](#publish-generator-stubs)

Customize the plugin stub before running `plugin:resource`:

```
php artisan vendor:publish --tag=filament-utilities-stubs
```

Stubs are copied to `stubs/filament-utilities/` in your application root.

### Configuration

[](#configuration)

Publish the config file to customize translator path aliases, missing-key scaffolding, and Shield guard overrides:

```
php artisan vendor:publish --tag=filament-utilities-config
```

This copies `config/filament-utilities.php` to your application's `config/` directory:

```
return [
    'shield' => [
        'resources' => [
            'exclude' => [
                // Resource classes omitted from the 'web' guard permission matrix.
            ],
        ],
        'policies' => [
            'methods' => ['viewAny', 'view', 'create', 'update'],
        ],
    ],
    'translator' => [
        // Scaffold missing translation keys while resolving labels.
        'create_missing_translation_keys' => true,

        // Map namespaces to translation path aliases.
        'path_aliases' => [
            'App\\Livewire' => 'livewire',
            'Modules\\Users\\Filament\\Resources' => 'modules/users',
        ],
    ],
];
```

`UtilitiesPlugin` reads these values when registering `TranslatorPlugin`, `Activitylog`, `FilamentShieldPlugin`, and the bundled `RoleResource`.

### Opinionated Filament defaults and macros

[](#opinionated-filament-defaults-and-macros)

The package ships several opt-in helpers. They are **not** applied automatically — call them from your own service provider's `boot()` method:

```
use Syriable\Filament\Plugins\Utilities\UtilitiesServiceProvider;

public function boot(): void
{
    UtilitiesServiceProvider::initializeFilamentComponents();
    UtilitiesServiceProvider::microFilamentComponents();
    UtilitiesServiceProvider::configureFactoryIcons();
    UtilitiesServiceProvider::configureActivitylogTimeline();
}
```

`initializeFilamentComponents()` applies global defaults via `configureUsing()`:

- end-aligned form actions on pages,
- `TextInput` capped at 255 characters and trimmed,
- trimmed `Textarea`,
- consistent modal alignment/width for actions,
- a single-column responsive `Schema` default,
- when [`codewithdennis/filament-advanced-components`](https://filamentphp.com/plugins/codewithdennis-advanced-components) is installed, `AdvancedTextColumn` values become clickable `mailto:` / `tel:` / `https://wa.me/` links.

`microFilamentComponents()` registers convenience macros:

- `ToggleButtons::fullWidth()`,
- `Section::prime()` (a rounded, bordered container),
- `Textarea::counter()` — renders a live character counter using this package's `filament-utilities::filament.components.textarea` field wrapper.

`configureFactoryIcons()` registers your application's `resources/svg/icons` directory as a Blade Icons set (`fluxwork`, prefix `flux`).

`configureActivitylogTimeline()` applies compact defaults and a per-event icon map to [`syriable/filament-activitylog`](https://github.com/syriable/filament-activitylog)'s `ActivitylogTimeline` component.

> The `AdvancedTextColumn` integration requires the optional, paid [`codewithdennis/filament-advanced-components`](https://filamentphp.com/plugins/codewithdennis-advanced-components)package. It is guarded by `class_exists()`, so the rest of the defaults work without it.

Testing
-------

[](#testing)

```
composer test
```

Other useful scripts:

```
composer analyse   # PHPStan (512M memory limit)
composer lint      # Laravel Pint
```

Run `composer analyse` instead of invoking PHPStan directly — the package analysis exceeds PHP's default 128M memory limit.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Syriable](https://github.com/syriable)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.9% 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

5

Last Release

40d ago

Major Versions

0.1.3 → 5.x-dev2026-06-14

PHP version history (2 changes)0.1.0PHP ^8.3

0.1.1PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/286110444?v=4)[syriable](/maintainers/syriable)[@syriable](https://github.com/syriable)

---

Top Contributors

[![alkhatibsy](https://avatars.githubusercontent.com/u/23545455?v=4)](https://github.com/alkhatibsy "alkhatibsy (14 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelfilamentfilament-pluginfilamentphpsyriablefilament-utilities

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/syriable-filament-utilities/health.svg)

```
[![Health](https://phpackages.com/badges/syriable-filament-utilities/health.svg)](https://phpackages.com/packages/syriable-filament-utilities)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16121.5k](/packages/backstage-mails)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6649.5k2](/packages/marcelweidum-filament-passkeys)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12453.6k](/packages/jibaymcs-filament-tour)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k19](/packages/wsmallnews-filament-nestedset)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k5](/packages/tapp-filament-form-builder)

PHPackages © 2026

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