PHPackages                             greatwolf3/filament-module-generator - 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. greatwolf3/filament-module-generator

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

greatwolf3/filament-module-generator
====================================

Filament 5 plugin for generating Laravel modules with nwidart/laravel-modules integration

v4.0.7(3w ago)015↓100%MITPHPPHP ^8.3

Since May 12Pushed 3w agoCompare

[ Source](https://github.com/Greatwolf3/filament-module-generator)[ Packagist](https://packagist.org/packages/greatwolf3/filament-module-generator)[ Docs](https://github.com/Greatwolf3/filament-module-generator)[ RSS](/packages/greatwolf3-filament-module-generator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (7)Versions (12)Used By (0)

Filament Module Generator
=========================

[](#filament-module-generator)

A plugin for Filament 5 that simplifies multilingual resource generation for Laravel modules with `nwidart/laravel-modules`.

Features
--------

[](#features)

- ✅ Automatic nwidart module generation
- ✅ Filament 5 compatible resource creation
- ✅ Automatic correct namespaces
- ✅ **Multilingual support with --languages option**
- ✅ Migration with existing table check
- ✅ Navigation groups for menu organization
- ✅ Complete and functional Filament 5 tables
- ✅ **Plural subdirectories for resources (e.g. Products/)**
- ✅ **Automatic PanelProvider registration with discoverResources**

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

[](#installation)

```
composer require greatwolf3/filament-module-generator
```

The service provider will be registered automatically.

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

[](#requirements)

- PHP 8.4+
- Laravel 13.0+
- Filament 5.4+
- nwidart/laravel-modules 13.0+

Configuration
-------------

[](#configuration)

Publish the configuration file (optional):

```
php artisan vendor:publish --tag="filament-module-generator-config"
```

Usage
-----

[](#usage)

### Module Resource Generation

[](#module-resource-generation)

```
# Generate a resource in an existing module (default: Italian and English)
php artisan module:filament-resource Category Prova

# Generate a resource with specific multilingual support
php artisan module:filament-resource Product Ecommerce --languages=it,en,fr,de

# Generate a resource in a new module (automatically creates the module)
php artisan module:filament-resource Product Ecommerce --panel=admin
```

The command automatically executes:

1. ✅ Module verification/creation
2. ✅ Model creation with multilingual fields
3. ✅ Migration creation with columns for each language
4. ✅ Automatic migration execution
5. ✅ Filament 5 resource generation with translatable fields
6. ✅ Automatic movement to module with plural subdirectories
7. ✅ Page creation (List, Create, Edit)
8. ✅ Automatic PanelProvider registration

### Module Management

[](#module-management)

```
# List all modules
php artisan module:list

# Create a new module
php artisan module:make NomeModulo
```

Generated Structure
-------------------

[](#generated-structure)

The plugin creates the following structure with plural subdirectories:

```
Modules/
├── Ecommerce/
│   ├── app/
│   │   └── Models/
│   │       └── Product.php
│   ├── database/
│   │   └── migrations/
│   │       └── 2026_05_15_201234_create_products_table.php
│   └── Filament/
│       └── Resources/
│           └── Products/           # Plural subdirectory
│               ├── ProductResource.php
│               └── Pages/
│                   ├── ListProducts.php
│                   ├── CreateProduct.php
│                   └── EditProduct.php

```

Multilingual Support
--------------------

[](#multilingual-support)

The generator automatically creates translatable fields for each specified language:

### Model (Product.php)

[](#model-productphp)

```
protected $fillable = [
    'name',
    'name_it',
    'name_en',
    'name_fr',
];
```

### Migration

[](#migration)

```
Schema::create('products', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('name_it')->nullable();
    $table->string('name_en')->nullable();
    $table->string('name_fr')->nullable();
    $table->timestamps();
});
```

### Filament Resource

[](#filament-resource)

```
public static function form(Schema $form): Schema
{
    return $form
        ->schema([
            Forms\Components\TextInput::make('name_it')
                ->label('Name (it)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name_en')
                ->label('Name (en)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name_fr')
                ->label('Name (fr)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name')
                ->required()
                ->maxLength(255),
        ]);
}
```

Example Generated Resource
--------------------------

[](#example-generated-resource)

```
class ProductResource extends Resource
{
    protected static ?string $model = Product::class;
    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-stack';
    protected static ?string $slug = 'ecommerce/products';
    protected static string|UnitEnum|null $navigationGroup = 'Ecommerce';

    public static function form(Schema $form): Schema
    {
        return $form
            ->schema([
                // Automatically generated multilingual fields
                Forms\Components\TextInput::make('name_it')
                    ->label('Name (it)')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name_en')
                    ->label('Name (en)')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name')
                    ->required()
                    ->maxLength(255),
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\TextColumn::make('name')
                    ->searchable()
                    ->sortable(),
                Tables\Columns\TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                Tables\Columns\TextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ]);
    }

    public static function getPages(): array
    {
        return [
            'index' => Pages\ListProducts::route('/'),
            'create' => Pages\CreateProduct::route('/create'),
            'edit' => Pages\EditProduct::route('/{record}/edit'),
        ];
    }
}
```

Advanced Features
-----------------

[](#advanced-features)

### Plural Subdirectories

[](#plural-subdirectories)

Resources are organized in plural subdirectories for better organization:

- `Products/` instead of `Product/`
- `Categories/` instead of `Category/`

### Automatic PanelProvider Registration

[](#automatic-panelprovider-registration)

The generator automatically registers resources in the specified PanelProvider using `discoverResources`:

```
->discoverResources(in: base_path('Modules/Ecommerce/Filament/Resources'), for: 'Modules\Ecommerce\Filament\Resources')
```

### Correct Namespaces

[](#correct-namespaces)

The plugin automatically corrects namespaces in generated module providers to ensure PSR-4 compatibility.

### Smart Migrations

[](#smart-migrations)

Migrations include checks to avoid duplicate table creation and are executed automatically.

Available Commands
------------------

[](#available-commands)

CommandDescription`module:filament-resource {name} {module}`Generate multilingual Filament resource for module`--panel={panel}`Specify the PanelProvider to update`--languages={it,en,fr}`Specify supported languages (default: it,en)AdminPanelProvider Integration
------------------------------

[](#adminpanelprovider-integration)

The generator automatically adds resource registration to your `AdminPanelProvider`:

```
// In the panel() method
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
->discoverResources(in: base_path('Modules/Ecommerce/Filament/Resources'), for: 'Modules\Ecommerce\Filament\Resources')
```

No manual auto-discovery configuration is required.

License
-------

[](#license)

MIT License

Support
-------

[](#support)

For issues or feature requests, open an issue on GitHub.

---

Generatore Modulo Filament
==========================

[](#generatore-modulo-filament)

Un plugin per Filament 5 che semplifica la generazione di risorse multilingua per moduli Laravel con `nwidart/laravel-modules`.

Caratteristiche
---------------

[](#caratteristiche)

- ✅ Generazione automatica di moduli nwidart
- ✅ Creazione di risorse Filament 5 compatibili
- ✅ Namespace corretti automatici
- ✅ **Supporto multilingua con opzione --languages**
- ✅ Migration con controllo tabella esistente
- ✅ Navigation groups per organizzazione menu
- ✅ Tabelle Filament 5 complete e funzionanti
- ✅ **Sottodirectory plurali per risorse (es. Products/)**
- ✅ **Registrazione automatica nel PanelProvider con discoverResources**

Installazione
-------------

[](#installazione)

```
composer require greatwolf3/filament-module-generator
```

Il provider del servizio verrà registrato automaticamente.

Requisiti
---------

[](#requisiti)

- PHP 8.4+
- Laravel 13.0+
- Filament 5.4+
- nwidart/laravel-modules 13.0+

Configurazione
--------------

[](#configurazione)

Pubblica il file di configurazione (opzionale):

```
php artisan vendor:publish --tag="filament-module-generator-config"
```

Utilizzo
--------

[](#utilizzo)

### Generazione Risorse Modulo

[](#generazione-risorse-modulo)

```
# Genera una risorsa in un modulo esistente (default: italiano e inglese)
php artisan module:filament-resource Category Prova

# Genera una risorsa con supporto multilingua specifico
php artisan module:filament-resource Product Ecommerce --languages=it,en,fr,de

# Genera una risorsa in un nuovo modulo (crea automaticamente il modulo)
php artisan module:filament-resource Product Ecommerce --panel=admin
```

Il comando esegue automaticamente:

1. ✅ Verifica/creazione del modulo
2. ✅ Creazione del modello con campi multilingua
3. ✅ Creazione della migration con colonne per ogni lingua
4. ✅ Esecuzione automatica della migration
5. ✅ Generazione della risorsa Filament 5 con campi translatibili
6. ✅ Spostamento automatico nel modulo con sottodirectory plurali
7. ✅ Creazione delle pagine (List, Create, Edit)
8. ✅ Registrazione automatica nel PanelProvider

### Gestione Moduli

[](#gestione-moduli)

```
# Lista tutti i moduli
php artisan module:list

# Crea un nuovo modulo
php artisan module:make NomeModulo
```

Struttura Generata
------------------

[](#struttura-generata)

Il plugin crea la seguente struttura con sottodirectory plurali:

```
Modules/
├── Ecommerce/
│   ├── app/
│   │   └── Models/
│   │       └── Product.php
│   ├── database/
│   │   └── migrations/
│   │       └── 2026_05_15_201234_create_products_table.php
│   └── Filament/
│       └── Resources/
│           └── Products/           # Sottodirectory plurale
│               ├── ProductResource.php
│               └── Pages/
│                   ├── ListProducts.php
│                   ├── CreateProduct.php
│                   └── EditProduct.php

```

Supporto Multilingua
--------------------

[](#supporto-multilingua)

Il generatore crea automaticamente campi translatibili per ogni lingua specificata:

### Modello (Product.php)

[](#modello-productphp)

```
protected $fillable = [
    'name',
    'name_it',
    'name_en',
    'name_fr',
];
```

### Migration

[](#migration-1)

```
Schema::create('products', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('name_it')->nullable();
    $table->string('name_en')->nullable();
    $table->string('name_fr')->nullable();
    $table->timestamps();
});
```

### Risorsa Filament

[](#risorsa-filament)

```
public static function form(Schema $form): Schema
{
    return $form
        ->schema([
            Forms\Components\TextInput::make('name_it')
                ->label('Name (it)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name_en')
                ->label('Name (en)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name_fr')
                ->label('Name (fr)')
                ->maxLength(255),
            Forms\Components\TextInput::make('name')
                ->required()
                ->maxLength(255),
        ]);
}
```

Esempio di Risorsa Generata
---------------------------

[](#esempio-di-risorsa-generata)

```
class ProductResource extends Resource
{
    protected static ?string $model = Product::class;
    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-stack';
    protected static ?string $slug = 'ecommerce/products';
    protected static string|UnitEnum|null $navigationGroup = 'Ecommerce';

    public static function form(Schema $form): Schema
    {
        return $form
            ->schema([
                // Campi multilingua generati automaticamente
                Forms\Components\TextInput::make('name_it')
                    ->label('Name (it)')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name_en')
                    ->label('Name (en)')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name')
                    ->required()
                    ->maxLength(255),
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\TextColumn::make('name')
                    ->searchable()
                    ->sortable(),
                Tables\Columns\TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                Tables\Columns\TextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ]);
    }

    public static function getPages(): array
    {
        return [
            'index' => Pages\ListProducts::route('/'),
            'create' => Pages\CreateProduct::route('/create'),
            'edit' => Pages\EditProduct::route('/{record}/edit'),
        ];
    }
}
```

Funzionalità Avanzate
---------------------

[](#funzionalità-avanzate)

### Sottodirectory Plurali

[](#sottodirectory-plurali)

Le risorse vengono organizzate in sottodirectory plurali per una migliore organizzazione:

- `Products/` invece di `Product/`
- `Categories/` invece di `Category/`

### Registrazione Automatica PanelProvider

[](#registrazione-automatica-panelprovider)

Il generatore registra automaticamente le risorse nel PanelProvider specificato usando `discoverResources`:

```
->discoverResources(in: base_path('Modules/Ecommerce/Filament/Resources'), for: 'Modules\Ecommerce\Filament\Resources')
```

### Namespace Corretti

[](#namespace-corretti)

Il plugin corregge automaticamente i namespace nei provider dei moduli generati per garantire compatibilità con PSR-4.

### Migration Intelligenti

[](#migration-intelligenti)

Le migration includono controlli per evitare la creazione di tabelle duplicate e vengono eseguite automaticamente.

Comandi Disponibili
-------------------

[](#comandi-disponibili)

ComandoDescrizione`module:filament-resource {name} {module}`Genera risorsa Filament multilingua per modulo`--panel={panel}`Specifica il PanelProvider da aggiornare`--languages={it,en,fr}`Specifica le lingue supportate (default: it,en)Integrazione con AdminPanelProvider
-----------------------------------

[](#integrazione-con-adminpanelprovider)

Il generatore aggiunge automaticamente la registrazione delle risorse nel tuo `AdminPanelProvider`:

```
// Nel metodo panel()
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
->discoverResources(in: base_path('Modules/Ecommerce/Filament/Resources'), for: 'Modules\Ecommerce\Filament\Resources')
```

Non è necessario configurare manualmente l'auto-discovery.

Licenza
-------

[](#licenza)

MIT License

Supporto
--------

[](#supporto)

Per problemi o richieste di funzionalità, apri una issue su GitHub.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.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 ~0 days

Total

11

Last Release

25d ago

Major Versions

v1.0.0 → v2.0.02026-05-13

v2.0.0 → v3.0.02026-05-13

v3.0.0 → v4.0.02026-05-14

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7edd05d3fb79f96b94ad8d88b80b82813174662ad1452208bac112e317058f4e?d=identicon)[Greatwolf3](/maintainers/Greatwolf3)

---

Top Contributors

[![Greatwolf3](https://avatars.githubusercontent.com/u/4615415?v=4)](https://github.com/Greatwolf3 "Greatwolf3 (47 commits)")[![brunoguerzoni](https://avatars.githubusercontent.com/u/260463163?v=4)](https://github.com/brunoguerzoni "brunoguerzoni (1 commits)")

---

Tags

pluginlaravelgeneratormodulesnwidartfilament

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/greatwolf3-filament-module-generator/health.svg)

```
[![Health](https://phpackages.com/badges/greatwolf3-filament-module-generator/health.svg)](https://phpackages.com/packages/greatwolf3-filament-module-generator)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

208175.5k8](/packages/bezhansalleh-filament-google-analytics)[zidbih/laravel-deadlock

Make temporary Laravel workarounds expire and fail CI when ignored.

954.0k](/packages/zidbih-laravel-deadlock)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

19253.0k3](/packages/interaction-design-foundation-laravel-geoip)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)[awcodes/recently

Easily track and access recently viewed records in your filament panels.

4332.4k](/packages/awcodes-recently)

PHPackages © 2026

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