madbox-99 / filament-knowledge
Knowledge base plugin for Filament v5 - articles, categories, with optional SEO integration
Requires
- php: ^8.3
- filament/filament: ^5.0
- laravel/framework: ^12.0 || ^13.0
- nunomaduro/essentials: ^1.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^10.0 || ^11.0
- rector/rector: ^2.0
Suggests
- madbox-99/filament-seo: Add SEO meta fields to knowledge articles
README
Knowledge base plugin for Filament v5 — articles and categories, with optional SEO meta integration.
Requirements
- PHP 8.3+
- Laravel 12 or 13
- Filament v5
Installation
composer require madbox-99/filament-knowledge php artisan migrate
The package registers its own migrations, so no publishing step is needed. To customise the table names, publish the config file:
php artisan vendor:publish --tag=filament-knowledge-config
Registering the plugin
Add the plugin to your panel provider:
use Madbox99\FilamentKnowledge\FilamentKnowledgePlugin; public function panel(Panel $panel): Panel { return $panel ->plugin(FilamentKnowledgePlugin::make()); }
Both resources read their navigation group from the plugin instance, so you can move them into an existing group of your own application:
->plugin( FilamentKnowledgePlugin::make() ->navigationGroup('Content') ->navigationSort(3) )
What you get
| Resource | Purpose |
|---|---|
KnowledgeArticleResource |
Articles: title, slug, excerpt, rich text content, featured image, category, publish and feature toggles, publish date, sort order |
KnowledgeCategoryResource |
Categories: name, slug, sort order, article count |
Slugs are generated from the title (or name) whenever they are left blank.
Models
Madbox99\FilamentKnowledge\Models\KnowledgeArticle and KnowledgeCategory. Both ship @property annotations, so PHPStan and Larastan can type attribute access in the consuming application.
use Madbox99\FilamentKnowledge\Models\KnowledgeArticle; $articles = KnowledgeArticle::published() ->with('category') ->orderBy('sort_order') ->orderByDesc('published_at') ->paginate(9); $featured = KnowledgeArticle::featured()->published()->get();
Available scopes: published(), featured().
SEO integration
If madbox-99/filament-seo is installed, the article form gains a collapsible SEO section (title, description, keywords, canonical URL, noindex/nofollow, OG type and custom JSON-LD), and articles expose a seoMeta relationship:
$article->seoMeta?->description;
Without that package the SEO section is simply omitted — it is a suggest, not a hard dependency.
Frontend
This package covers the admin side only. The public pages are left to your application, so they can use its own layout, routing and design system.
Configuration
return [ 'table_names' => [ 'articles' => 'knowledge_articles', 'categories' => 'knowledge_categories', ], 'upload_directory' => 'knowledge-articles', ];
License
MIT. See LICENSE.