Complete plugin system with generator, management, and FilamentPHP v4 compatibility for Laravilt.ipsum
- Interactive CLI - Laravel Prompts with smart defaults
- Factory Pattern - Extensible feature-based architecture
- Priority System - Ordered feature execution (0-100)
- Stub Processing - Template-based file generation
- Auto-Discovery - Automatic plugin registration
Generate 13 component types within plugins:
- Migration - Database migrations with timestamps
- Model - Eloquent models with proper namespacing
- Controller - HTTP controllers
- Command - Artisan commands
- Job - Queueable jobs
- Event - Event classes
- Listener - Event listeners
- Notification - Notifications with mail support
- Seeder - Database seeders
- Factory - Model factories
- Test - Feature/Unit tests
- Lang - Language files
- Route - Route files
- AI Agent Support - Built-in MCP server for Claude, GPT, etc.
- 6 Tools Available - list-plugins, plugin-info, generate-plugin, generate-component, list-component-types, plugin-structure
- Natural Language - Generate plugins through conversation
- Auto-Discovery - AI agents can explore plugin ecosystem
- Cover Images - Auto-generated 1200x630px screenshots
- Dark Theme - Professional gradient backgrounds
- Plugin Branding - Cyan icon with Laravilt branding
- Social Media Ready - Optimized for GitHub/Twitter previews
- README Integration - Auto-embedded in documentation
- Workflows - tests.yml, fix-php-code-styling.yml, dependabot-auto-merge.yml
- Issue Templates - Bug reports, feature requests (GitHub forms)
- Dependabot - Automated dependency updates
- FUNDING.yml - GitHub Sponsors support
- CONTRIBUTING.md - Contribution guidelines
- SECURITY.md - Security vulnerability reporting
- Service Provider - Auto-discovery compatible
- Configuration - Publishable config with env support
- Composer - PSR-4 autoloading, version constraints
- Testing - Pest, PHPStan, Pint, Testbench
- Assets - Vite, Tailwind v4, Vue.js plugin support
- Documentation - README, CHANGELOG, LICENSE, CODE_OF_CONDUCT
- PHP 8.3+
- Laravel 12+
- FilamentPHP v4+ (for plugins features)
- Composer 2+
- Node.js 18+ (for asset compilation)
composer require laravilt/pluginsThe service provider is auto-discovered and will register automatically.
Publish the configuration file:
php artisan vendor:publish --tag=laravilt-plugins-configConfigure defaults in config/laravilt-plugins.php:
return [
'defaults' => [
'vendor' => env('LARAVILT_PLUGINS_DEFAULT_VENDOR', 'laravilt'),
'author' => env('LARAVILT_PLUGINS_DEFAULT_AUTHOR', 'Your Name'),
'email' => env('LARAVILT_PLUGINS_DEFAULT_EMAIL', 'your@email.com'),
'license' => env('LARAVILT_PLUGINS_DEFAULT_LICENSE', 'MIT'),
'github_sponsor' => env('LARAVILT_PLUGINS_DEFAULT_GITHUB_SPONSOR', 'yourusername'),
],
];Install the MCP server configuration:
php artisan laravilt:install-mcpThis command will:
- Publish
routes/ai.php(if needed) - Register the MCP server in your routes
- Update
.mcp.jsonfor AI clients
After installation, restart your AI agent to access the plugin management tools.
Interactive mode (recommended):
php artisan laravilt:plugin MyPluginNon-interactive mode:
php artisan laravilt:plugin MyPlugin --no-interactionThe command will guide you through:
- Plugin name and description
- Feature selection (migrations, views, routes, assets, etc.)
- Author details (optional)
- GitHub sponsor (optional)
- Language selection
Use the unified component generator:
php artisan laravilt:makeOr specify directly:
# Generate a model
php artisan laravilt:make my-plugin model Post
# Generate a controller
php artisan laravilt:make my-plugin controller PostController
# Generate a migration
php artisan laravilt:make my-plugin migration CreatePostsTable
# Generate a command
php artisan laravilt:make my-plugin command ProcessPostsCommand
# Generate a job
php artisan laravilt:make my-plugin job ProcessPost
# Generate a test
php artisan laravilt:make my-plugin test PostTestAll 13 component types are supported with proper namespace detection and PSR-4 structure.
my-plugin/
βββ .github/
β βββ workflows/
β β βββ tests.yml
β β βββ fix-php-code-styling.yml
β β βββ dependabot-auto-merge.yml
β βββ ISSUE_TEMPLATE/
β β βββ bug.yml
β β βββ config.yml
β βββ CONTRIBUTING.md
β βββ FUNDING.yml
β βββ SECURITY.md
β βββ dependabot.yml
βββ arts/
β βββ screenshot.jpg # Auto-generated cover image
βββ config/
β βββ laravilt-my-plugin.php
βββ database/
β βββ factories/
β βββ migrations/
β βββ seeders/
βββ resources/
β βββ css/
β β βββ app.css # Tailwind v4
β βββ js/
β β βββ app.js # Vue.js plugin
β βββ lang/
β β βββ en/
β βββ views/
βββ routes/
β βββ api.php
β βββ web.php
βββ src/
β βββ Commands/
β β βββ InstallMyPluginCommand.php
β βββ Http/
β β βββ Controllers/
β βββ Models/
β βββ MyPluginPlugin.php # Main plugin class
β βββ MyPluginServiceProvider.php
βββ tests/
β βββ Feature/
β β βββ DebugTest.php
β βββ Pest.php
β βββ TestCase.php
βββ CHANGELOG.md
βββ CODE_OF_CONDUCT.md
βββ LICENSE.md
βββ README.md
βββ composer.json
βββ package.json # If JS selected
βββ phpstan.neon
βββ pint.json
βββ testbench.yaml
βββ vite.plugin.js # If JS selected
The plugin system uses a Factory Pattern for extensible feature generation:
Features (Priority 0-100)
βββ Core Files (0-20)
β βββ ComposerJsonFeature (1)
β βββ GitignoreFeature (2)
β βββ ServiceProviderFeature (5)
β βββ PluginClassFeature (10)
β βββ InstallCommandFeature (12)
β βββ ConfigFeature (15)
βββ Structure Files (21-40)
β βββ MigrationsFeature (25)
β βββ RoutesFeature (30)
β βββ ViewsFeature (35)
β βββ LanguageFeature (40)
βββ Asset Files (41-60)
β βββ CssFeature (50)
β βββ JsFeature (51)
β βββ ArtsFeature (55)
βββ Testing Files (61-80)
β βββ TestingFeature (70)
β βββ TestbenchFeature (75)
β βββ PintFeature (76)
βββ Documentation Files (81-100)
βββ ReadmeFeature (85)
βββ GitHubFeature (90)
βββ DocumentationFeature (95)
Create a custom feature:
<?php
namespace App\PluginFeatures;
use Laravilt\Plugins\Features\AbstractFeature;
class CustomFeature extends AbstractFeature
{
public function getName(): string
{
return 'custom';
}
public function shouldGenerate(array $config): bool
{
return $config['generate_custom'] ?? false;
}
public function getPriority(): int
{
return 99; // Execute near the end
}
public function generate(array $config): void
{
// Your generation logic
$this->processor->generateFile(
$config['base_path'].'/custom/file.php',
'custom/file',
['key' => 'value']
);
}
}Register in config:
'features' => [
// ... existing features
\App\PluginFeatures\CustomFeature::class,
],List all installed Laravilt plugins.
Get detailed information about a specific plugin.
Arguments:
plugin(string): Plugin name in kebab-case
Generate a new plugin with specified features.
Arguments:
name(string): Plugin name in StudlyCasedescription(string, optional)migrations(bool, default: false)views(bool, default: false)webRoutes(bool, default: false)apiRoutes(bool, default: false)css(bool, default: false)js(bool, default: false)arts(bool, default: true)github(bool, default: true)phpstan(bool, default: true)
Generate a component within a plugin.
Arguments:
plugin(string): Plugin name in kebab-casetype(string): Component type (migration, model, controller, etc.)name(string): Component name
List all available component types.
Get the complete directory structure of a plugin.
Arguments:
plugin(string): Plugin name in kebab-case
You: "List all my plugins"
AI: [calls list-plugins tool]
You: "Create a blog plugin with migrations and views"
AI: [calls generate-plugin with appropriate parameters]
You: "Generate a Post model in the blog plugin"
AI: [calls generate-component]
Run tests in the plugins package:
cd packages/laravilt/plugins
composer testRun tests in a generated plugin:
cd packages/myvendor/my-plugin
composer test # Run Pest tests
composer format # Format code with Pint
composer analyse # Run PHPStan analysisComprehensive documentation is available in the docs/ directory:
- Getting Started
- Architecture
- Plugin Generation
- Component Generators
- Factory Pattern
- Features System
- MCP Server
- API Reference
Please see CONTRIBUTING.md for details.
If you discover any security-related issues, please email info@3x1.io instead of using the issue tracker.
Please see CHANGELOG.md for recent changes.
The MIT License (MIT). Please see License File for more information.
Support this project via GitHub Sponsors.
