Setup

A knowledge base needs its own, separate panel, since the plugin takes over the panel navigation. If you don't have one yet, create it with the built in filament command:

php artisan make:filament-panel knowledge-base

This creates a new panel provider in app/Providers/Filament/KnowledgeBasePanelProvider.php.

Then register the plugin on it:

use Guava\FilamentKnowledgeBase\Plugins\KnowledgeBasePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->id('knowledge-base')
        ->path('kb')
        // ...
        ->plugins([
            KnowledgeBasePlugin::make(),
        ]);
}

And that's it! The knowledge base is now available under /kb, or whatever you configured in the path option of the panel.

NOTEThe panel needs a custom theme with our source paths, otherwise nothing will be styled. See installation.

Custom docs path

By default, your markdown files live in docs/<panel-id> in the root of your project. You can point the plugin somewhere else:

KnowledgeBasePlugin::make(base_path('kb/my-knowledge-base'));

How the files inside that directory are organized is covered in writing documentation.

It's a regular panel

The knowledge base panel is a regular filament panel, so branding, colors, middleware and everything else is configured in its panel provider like in any other panel:

$panel
    ->id('knowledge-base')
    ->path('kb')
    ->brandName('My Docs')
    ->plugin(KnowledgeBasePlugin::make());
guava/filament-knowledge-base 161K Installationen · 210 Sterne
// COOKIES

Ein paar Cookies halten die Seite am Laufen; andere merken sich Einstellungen oder zählen Besuche. Sie entscheiden.

Cookie-Richtlinie