intcore/filament-resource-generator
Composer 安装命令:
composer require intcore/filament-resource-generator
包简介
A powerful Laravel Filament package for generating complete modules with models, migrations, factories, seeders, and admin resources
README 文档
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.
intcore/filament-resource-generator 适用场景与选型建议
intcore/filament-resource-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 10, 最近一次更新时间为 2025 年 09 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「generator」 「module」 「crud」 「laravel」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 intcore/filament-resource-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 intcore/filament-resource-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 intcore/filament-resource-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Yii2 module to manage website content. Kind of a CMS...
Phalcon Model Generator
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-13