Add a Filament Resource to an existing Filament plugin
Creates a new Filament Resource within an existing plugin, including all necessary pages (List, Create, Edit). Use this to scaffold a complete resource for managing a data type, optionally generating the Eloquent model and migration file.
/plugin marketplace add mwguerra/claude-code-plugins/plugin install laravel-filament-package-development-specialist@mwguerra-marketplace<vendor/plugin-name> <ResourceName> [--with-model] [--soft-deletes]Add a new Filament Resource to an existing Filament plugin.
<vendor/plugin-name> <ResourceName>
Example: mwguerra/filament-blog BlogPost
--with-model - Also create the Eloquent Model--soft-deletes - Include soft delete support--with-migration - Create a migration filepackages/vendor/plugin-name/src/Resources/ResourceNameResource.phpListResourceNames.phpCreateResourceName.phpEditResourceName.phpViewResourceName.php (optional)--with-model, create Model at src/Models/ResourceName.php--with-migration, create migration filesrc/
├── Resources/
│ └── BlogPostResource/
│ ├── Pages/
│ │ ├── CreateBlogPost.php
│ │ ├── EditBlogPost.php
│ │ └── ListBlogPosts.php
│ └── BlogPostResource.php
└── Models/
└── BlogPost.php (if --with-model)
database/
└── migrations/
└── 2024_01_01_000000_create_blog_posts_table.php (if --with-migration)
The Resource includes:
The Plugin class is updated to include:
public function getResources(): array
{
return [
BlogPostResource::class,
];
}