intcore / filament-resource-generator
A powerful Laravel Filament package for generating complete modules with models, migrations, factories, seeders, and admin resources
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/intcore/filament-resource-generator
Requires
- php: ^8.1|^8.2|^8.3
 - filament/filament: ^3.0
 - laravel/framework: ^10.0|^11.0|^12.0
 - spatie/laravel-package-tools: ^1.13
 
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
 - phpunit/phpunit: ^10.0
 
README
A powerful Laravel Filament package for generating complete modules with models, migrations, factories, seeders, and admin resources through an intuitive web interface.
Features
- ๐ Complete Module Generation: Generate models, migrations, factories, seeders, and Filament resources
 - ๐ฏ Intuitive Web Interface: User-friendly wizard-based form in Filament admin
 - ๐ Smart Relationships: Automatic foreign key detection and relationship configuration
 - ๐ Table Introspection: Intelligent dropdown selection for existing models and columns
 - ๐จ Customizable Forms: Multiple input types (text, textarea, select, toggle, date pickers, etc.)
 - ๐ Auto-population: Smart defaults based on column types and naming conventions
 - ๐โโ๏ธ Auto Execution: Optional automatic migration and seeder execution
 - ๐งช Factory Integration: Automatic factory generation with seeder dependencies
 
Installation
You can install the package via Composer:
composer require intcore/filament-resource-generator
Plugin Registration
Register the plugin in your AdminPanelProvider:
// app/Providers/Filament/AdminPanelProvider.php use Intcore\FilamentResourceGenerator\ResourceGenerator; public function panel(Panel $panel): Panel { return $panel // ... other configuration ->plugin(ResourceGenerator::make()); }
Usage
- 
Access the Module Generator: Navigate to your Filament admin panel and look for "Module Generator" in the navigation menu.
 - 
Create a New Module:
- Fill in the module information (name, description, etc.)
 - Define your database schema (create new tables or use existing ones)
 - Configure your Filament resource (forms, tables, pages, actions)
 
 - 
Generate: Click generate and watch as your complete module is created with all necessary files.
 
Example: Creating a Blog Module
- 
Module Information:
- Module Name: 
Post - Table Name: 
posts - Description: 
Blog post management 
 - Module Name: 
 - 
Database Schema:
title(string, required)content(longText)category_id(foreignId โ categories table)is_published(boolean)published_at(datetime, nullable)
 - 
Filament Configuration:
- Form Fields: Auto-configured based on column types
 - Table Columns: Smart relationship display (category.name instead of category_id)
 - Pages: List, Create, Edit
 - Actions: Edit, Delete, Bulk Delete
 
 
Generated Files
The package generates:
- Model: 
app/Models/Post.phpwith relationships and fillable fields - Migration: 
database/migrations/create_posts_table.php - Factory: 
database/factories/PostFactory.php - Seeder: 
database/seeders/PostSeeder.php - Filament Resource: 
app/Filament/Resources/PostResource.php - Resource Pages: Create, Edit, List pages
 
Advanced Features
Foreign Key Relationships
The package intelligently handles foreign key relationships:
- Auto-detection: 
category_idcolumn automatically suggestsCategorymodel - Dynamic Dropdowns: Select from actual models and their database columns
 - Smart Display: Table columns show 
category.nameinstead of raw IDs - Relationship Forms: Foreign key fields become searchable select dropdowns with inline creation
 
Existing Table Support
You can build Filament resources for existing tables:
- Select "Use Existing Table" in Database Schema
 - Choose from available tables
 - Automatic column detection and type mapping
 - Configure forms and tables based on actual database structure
 
Custom Input Types
Support for various Filament input types:
- Text Input, Textarea, Rich Text Editor
 - Select, Toggle, Tags Input
 - Date Picker, DateTime Picker, Time Picker
 - File Upload, Color Picker
 - And more...
 
Requirements
- PHP 8.1+
 - Laravel 10.0+
 - Filament 3.0+
 
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.