Slash Command
/add-filament-resource
Add a Filament Resource to an existing Filament plugin
From laravel-filament-package-development-specialistInstall
1
Run in your terminal$
npx claudepluginhub mwguerra/claude-code-plugins --plugin laravel-filament-package-development-specialistDetails
Argument
<vendor/plugin-name> <ResourceName> [--with-model] [--soft-deletes]Allowed Tools
Bash(php:*)ReadWriteGlob
Command Content
Add Filament Resource
Add a new Filament Resource to an existing Filament plugin.
Input Format
<vendor/plugin-name> <ResourceName>
Example: mwguerra/filament-blog BlogPost
Options
--with-model- Also create the Eloquent Model--soft-deletes- Include soft delete support--with-migration- Create a migration file
Process
- Locate the plugin at
packages/vendor/plugin-name/ - Create the Resource class at
src/Resources/ResourceNameResource.php - Create the Resource pages:
ListResourceNames.phpCreateResourceName.phpEditResourceName.phpViewResourceName.php(optional)
- If
--with-model, create Model atsrc/Models/ResourceName.php - If
--with-migration, create migration file - Update the Plugin class to register the resource
Files Created
src/
├── 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)
Resource Structure
The Resource includes:
- Form schema with common fields
- Table columns with sorting/searching
- Filters and actions
- Navigation configuration
- Authorization policies placeholder
Registration
The Plugin class is updated to include:
public function getResources(): array
{
return [
BlogPostResource::class,
];
}
Stats
Parent Repo Stars15
Parent Repo Forks4
Last CommitDec 18, 2025