syriable/filament-utilities

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

Maintainers

Package info

github.com/syriable/filament-utilities

pkg:composer/syriable/filament-utilities

Fund package maintenance!

syriable

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-06-07 13:41 UTC

This package is auto-updated.

Last update: 2026-06-07 14:10:25 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Software License

Developer tooling for the Syriable Filament ecosystem. The package wires custom Artisan generators that scaffold translatable Filament resources and module plugins, built on top of syriable/filament-translator.

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 — scaffolds a Filament panel plugin for an InterNACHI/modular module and registers it 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.

Requirements

For plugin:resource, your application must use InterNACHI/modular with modules under the path configured in config/app-modules.php.

Installation

Install the package via Composer:

composer require syriable/filament-utilities

Register TranslatorPlugin on every Filament panel that should resolve convention-based labels:

use Filament\Panel;
use Syriable\Filament\Plugins\Translator\TranslatorPlugin;

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

UtilitiesServiceProvider is auto-discovered. No panel plugin registration is required for the generators to work.

Usage

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 class Extends
Resource 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. Enable createMissingTranslationKeys() during local development to scaffold missing keys automatically.

Generate a module Filament plugin

Scaffold a Filament plugin class inside a modular application:

php artisan plugin:resource users

When the module name is omitted, the command interactively lists directories under modules/.

The command:

  1. Creates {Module}Plugin.php in modules/{module}/src/ using the published stub.
  2. Registers the plugin on the module's service provider via Panel::configureUsing().

The generated plugin discovers resources, pages, and widgets under the module's Filament/ directories.

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.

Testing

composer test

Other useful scripts:

composer analyse   # PHPStan
composer lint      # Laravel Pint

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.