# AppServiceProvider boot method: ``` public function boot(): void { FilamentView::registerRenderHook( PanelsRenderHook::TOPBAR_START, fn (): View => view('topbar-title'), ); } ``` # Ideal topbar-title.blade.php file: ``` @if ($header = $this->getHeader()) {{ $header }} @elseif ($heading = $this->getHeading()) @php $subheading = $this->getSubheading(); @endphp @if ($heading instanceof \Illuminate\Contracts\Support\Htmlable) {{ $heading }} @endif @if ($subheading instanceof \Illuminate\Contracts\Support\Htmlable) {{ $subheading }} @endif @endif ``` # topbar-title.blade.php with controller: ``` @php $controller = request()->route()->getController(); $breadcrumbs = $controller->getBreadcrumbs(); @endphp @if ($header = $controller->getHeader()) {{ $header }} @elseif ($heading = $controller->getHeading()) @php $subheading = $controller->getSubheading(); @endphp

{{ $heading }}

@if ($subheading)

{{ $subheading }}

@endif @if ($breadcrumbs)
@endif ```