barbasolution / filament-knowledge-base
A configurable multilingual knowledge base resource and browser for Filament panels.
Package info
gitlab.com/barbasolution/filament-knowledge-base
pkg:composer/barbasolution/filament-knowledge-base
Requires
- php: ^8.2
- filament/filament: ^4.1 || ^5.0
- illuminate/database: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
- livewire/livewire: ^3.0 || ^4.0
- spatie/laravel-package-tools: ^1.93
Requires (Dev)
- orchestra/testbench: ^10.0 || ^11.0
- phpunit/phpunit: ^11.5 || ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A multilingual knowledge base for Filament panels by BarbaSolution. Manage rich text articles with locale tabs, tags, images, and video embeds. Users can browse published articles in a searchable help modal with clickable tag filters.
Requires Laravel 12 or 13, with a compatible PHP version (the package requires PHP 8.2+). Supports Filament 4.1+ with Livewire 3, and Filament 5 with Livewire 4.
Screenshots
Article management
![]()
Searchable help modal
![]()
Article view
![]()
Installation
Install through Composer:
composer require barbasolution/filament-knowledge-base
Publish the migration, run it, and publish the frontend assets:
php artisan vendor:publish --tag=filament-knowledge-base-migrations
php artisan migrate
php artisan filament:assets
Register the plugin in your Filament panel provider:
use BarbaSolution\FilamentKnowledgeBase\KnowledgeBasePlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(KnowledgeBasePlugin::make());
}
Add the plugin to your existing panel configuration. The service provider is discovered automatically.
You can now create articles through the Knowledge Bases resource. Click the help button or press F1 to browse published articles in the current application locale.
For Laravel Sail, prefix commands with vendor/bin/sail.
Publishing files
Publish only the files you want to customize:
| Files | Command | Destination |
|---|---|---|
| Configuration | php artisan vendor:publish --tag=filament-knowledge-base-config | config/knowledge_base.php |
| Migrations | php artisan vendor:publish --tag=filament-knowledge-base-migrations | database/migrations |
| Translations | php artisan vendor:publish --tag=filament-knowledge-base-translations | lang/vendor/filament-knowledge-base |
| Views | php artisan vendor:publish --tag=filament-knowledge-base-views | resources/views/vendor/filament-knowledge-base |
Configuration defaults and translations work without publishing. Interface translations are included for English, Bosnian, Croatian, and Serbian Latin.
If your application already has the knowledge-base table from an earlier integration, keep its existing migrations instead of publishing another table-creation migration.
After updating the package, run php artisan filament:assets and refresh the page to load the updated CSS and JavaScript. The package ships compiled styles; no npm setup is required.
Configuration
Publish the configuration and edit config/knowledge_base.php. See the default configuration for the complete file.
| Option | Purpose |
|---|---|
model | Eloquent model used for articles. Defaults to the package's KnowledgeBase model. |
resource | Filament resource used to manage articles. Defaults to the package's KnowledgeBaseResource. |
policy | Your application's policy class for resource authorization. Defaults to null, which applies no resource authorization rules. |
locales | Article languages, each with a label and optional flag. An empty list uses app.locale. |
shortcut | A single keyboard key to open the browser. Defaults to F1; use null to disable it. |
navigation_group | Sidebar group label or translation key for the resource. Defaults to null for no group. |
widget.enabled | Show the help button and browser. Defaults to true. |
widget.component | Livewire browser component. Defaults to the package's KnowledgeBaseBrowser. |
widget.render_hook | Placement of the help button. Defaults to PanelsRenderHook::GLOBAL_SEARCH_BEFORE. |
widget.icon | Help button icon. Defaults to heroicon-o-book-open. |
widget.label | Help button label or translation key. Defaults to the package's translated “Open knowledge base” label. |
widget.tooltip_with_shortcut | Include the shortcut in the button tooltip. Defaults to true. |
attachments.disk | Upload disk. Defaults to null, which uses filesystems.default. |
attachments.directory | Upload directory. Defaults to knowledge-base. |
attachments.visibility | Attachment visibility. Defaults to public. |
attachments.max_size | Maximum upload size in kilobytes. Defaults to 8192. |
custom_blocks | Rich editor block classes. Includes VideoEmbedBlock for YouTube and Vimeo; use [] to remove it. |
For example, configure article locales and flags:
"locales" => [
"en" => ["label" => "English", "flag" => "images/flags/en.svg"],
"bs" => ["label" => "Bosanski", "flag" => null],
],
Flag paths are relative to public or can be absolute URLs. Locale labels can be translation keys. Each configured locale appears in a form tab, and translations are stored as linked article rows. The browser shows published entries for the current locale without falling back to another language.
To apply your application's authorization rules:
"policy" => \App\Policies\KnowledgeBasePolicy::class,
Use BarbaSolution\FilamentKnowledgeBase\Models\KnowledgeBase in the policy's record parameters. The policy controls the management resource; the browser lists published entries for the current locale independently.
Released under the MIT license.