Discover how to render a custom view on the left side of the top bar for improved navigation and UI flexibility.
To achieve this, we'll utilize Filament's Render Hooks, which allow you to insert views or strings at specific positions within the interface.
Open your app/Providers/AppServiceProvider.php
file and add the following code within the boot method.
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;
//....
FilamentView::registerRenderHook(
name: PanelsRenderHook::TOPBAR_START,
hook: fn() => view('filament.topbarStart'),
);
Create a view file at resources/views/filament/topbarStart.blade.php
and insert the following code:
<a href="https://laravelhive.net">
LaravelHive
</a>
Your link will be prominently displayed on the spacious left side, ideal for shortcuts, helpers, and more. Leverage FilamentPHP components to easily add Modals, Badges, and other elements.