PHP code example of diogogpinto / filament-page-context

1. Go to this page and download the library: Download diogogpinto/filament-page-context library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

diogogpinto / filament-page-context example snippets


$breadcrumbs = filament()->pageContext()->breadcrumbs;

$pageTitle = filament()->pageContext()->pageTitle;

@props([
    'breadcrumbs' => filament()->pageContext()->breadcrumbs,
])

<x-filament::breadcrumbs class="text-sm/[6px]" :breadcrumbs="$breadcrumbs"/>

use Illuminate\View\View;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    // your other methods
    FilamentView::registerRenderHook(
        PanelsRenderHook::TOPBAR_START,
        fn (): View => view('topbar-breadcrumbs'),
    );
}