syriable / filament-utilities
Developer tooling for the Syriable Filament ecosystem — translatable resource generators and modular plugin scaffolding.
Fund package maintenance!
Requires
- php: ^8.3
- filament/filament: ^5.3.5
- spatie/laravel-package-tools: ^1.15.0
- syriable/filament-translator: ^1.1
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.7|^4.0
- pestphp/pest-plugin-arch: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- rector/rector: ^2.0
- spatie/laravel-ray: ^1.26
README
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 extendsTranslatableResourceand 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-resourcepipeline so generated code is translation-ready out of the box.
Requirements
- PHP 8.3+
- Laravel 11, 12, or 13
- Filament 5.3.5+
syriable/filament-translator^1.1
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:
- Creates
{Module}Plugin.phpinmodules/{module}/src/using the published stub. - 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.