iamgeor.ge / schema-generator
A Laravel package for generating database schemas, models, and migrations through a Filament admin panel
Requires
- php: ^8.2
- filament/filament: ^3.2|^3.3
- illuminate/support: ^11.0|^12.0
README
A powerful Laravel package that provides a full-featured schema management system built on top of the Filament admin panel. It enables you to create, configure, and manage database schemas through an intuitive CRUD interface, then automatically generate corresponding migrations, models, and related files.
Key Benefits
- Filament-powered UI: Leverages the beautiful and responsive Filament admin panel
- Complete CRUD operations: Create, read, update, and delete schema definitions through the UI
- Code generation: Automatically generate models, migrations, and more
- Seamless integration: Works with your existing Laravel and Filament setup
Requirements
- PHP 8.2 or higher
- Laravel 11.0 or higher
- Filament 3.2 or higher
Installation
You can install the package via composer:
composer require iamgeor.ge/schema-generator
After installing the package, run the installation command:
php artisan schema:install
This will:
- Publish the configuration file
- Run migrations
- Set up the Filament panel
Usage
After installation, you can access the schema generator through the Filament admin panel at /schema
.
CRUD Operations
The package provides a full Filament-powered CRUD interface for managing your database schemas:
- Create: Define new schemas with table name, model name, and fields
- Read: View all your defined schemas in a searchable, filterable table
- Update: Modify existing schemas, add/remove fields, adjust options
- Delete: Remove schemas that are no longer needed
Schema Generation
For each schema, you can:
- Define the table structure (fields, types, constraints)
- Configure model options (fillable, casts, relationships)
- Generate migrations and models with a single click
- Preview the generated code before saving
Integration with Your Application
The generated code is automatically placed in your application's appropriate directories:
- Migrations in
database/migrations/
- Models in
app/Models/
(configurable)
Screenshot
The Schema Generator interface showing the full-featured UI with all tabs and components.
Features
- Filament Admin Panel Integration: Built directly on Filament 3.x for a polished admin experience
- Complete CRUD Operations: Full interface for creating, reading, updating, and deleting schemas
- Advanced Schema Definition: Define columns with types, constraints, relationships, and more
- Code Generation:
- Database migrations
- Eloquent models with proper attributes
- Support for relationships
- Timestamps, soft deletes, and other Laravel features
- Customization: Configure paths, namespaces, and generation options
- Developer Experience: Intuitive UI with instant feedback and code previews
- Extensibility: Built to be extended with custom generators and features
Configuration
The package publishes a configuration file that allows you to customize various aspects of code generation:
php artisan vendor:publish --tag="schema"
Configuration options:
return [ // Path where the Filament panel will be accessible 'path' => 'schema', // Generation paths 'paths' => [ 'models' => app_path('Models'), 'migrations' => database_path('migrations'), ], // Default generation options 'generation' => [ 'timestamps' => true, 'soft_deletes' => false, 'fillable' => true, 'namespace' => 'App\\Models', ], ];
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.