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 197K instalací · 209 hvězd
// COOKIES

Pár cookies drží web v chodu a pamatuje si jazyk, ve kterém čtete. Další počítají návštěvy a ty zůstávají vypnuté, dokud je nepovolíte.

Zásady cookies