Back button

At the bottom of the knowledge base sidebar, a "Back" button sends the user back to your app. It mirrors the "Knowledge base" button that the companion plugin renders in your regular panels.

By default, it links to your default panel.

Customizing the URL

If your users should be sent back to a different panel (or any other URL), you can change it:

use Filament\Facades\Filament;
use Guava\FilamentKnowledgeBase\Facades\KnowledgeBase;

$plugin->backUrl(fn () => KnowledgeBase::url(Filament::getPanel('app')));

A plain string works too:

$plugin->backUrl('/admin');

Customizing the button

To modify the button itself (label, icon, ...):

use Filament\Navigation\NavigationItem;

$plugin->modifyBackButtonUsing(fn (NavigationItem $item) => $item
    ->label('Back to app')
    ->icon('heroicon-o-arrow-left'));

Disabling the button

$plugin->disableBackButton();
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