PHPackages                             diogogpinto/filament-page-context - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. diogogpinto/filament-page-context

ActiveLibrary[Admin Panels](/categories/admin)

diogogpinto/filament-page-context
=================================

A Filament plugin that automatically injects current request breadcrumbs and page title into the filament() method, enhancing page context and navigation for Filament admin panels.

v1.0.6(1y ago)29292↓100%1[3 PRs](https://github.com/diogogpinto/filament-page-context/pulls)MITPHPPHP ^8.1CI passing

Since Oct 2Pushed 1w ago1 watchersCompare

[ Source](https://github.com/diogogpinto/filament-page-context)[ Packagist](https://packagist.org/packages/diogogpinto/filament-page-context)[ Docs](https://github.com/diogogpinto/filament-page-context)[ GitHub Sponsors](https://github.com/diogogpinto)[ RSS](/packages/diogogpinto-filament-page-context/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (12)Versions (9)Used By (0)

Filament Panel Page Context
===========================

[](#filament-panel-page-context)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7157355027c99fa0b0ff389629eed44121f5987a37f8bc0ee156ffe3224b1853/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64696f676f6770696e746f2f66696c616d656e742d706167652d636f6e746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/diogogpinto/filament-page-context)[![GitHub Tests Action Status](https://camo.githubusercontent.com/18167f4d76b844ddae741ba12abf804904257f4e7f8564f1b5aa3ee03b238493/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64696f676f6770696e746f2f66696c616d656e742d706167652d636f6e746578742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/diogogpinto/filament-page-context/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/143f05106530ae11e8a95a90b575d219b6b70f1cfbd9e5fa410dd9f6f1d9aaf4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64696f676f6770696e746f2f66696c616d656e742d706167652d636f6e746578742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265737175617265)](https://github.com/diogogpinto/filament-page-context/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5a16dc57939ce4e02153486e400d90ae3aef3290534c1bd84517e55925293949/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696f676f6770696e746f2f66696c616d656e742d706167652d636f6e746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/diogogpinto/filament-page-context)

A Filament plugin that automatically injects current request breadcrumbs and page title into the filament() method, enhancing context and navigation for admin panels. Developed with theme extensibility in mind, it seamlessly integrates with and allows further customization of Filament themes. Created with the purpose to get current request breadcrumbs and pagetitle and inject them anywhere in the panel.

It currently returns the current request's Filament breadcrumbs (with Filament's structure) and Page Title (can be a Custom Page Title, Resource Related Title or Record Related Title).

[![Filament Page Context example returned array](screenshots/filament-page-context-array-preview.png)](screenshots/filament-page-context-array-preview.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require diogogpinto/filament-page-context
```

Usage
-----

[](#usage)

That's it. Once you install this plugin, the FilamentPageContext Service Provider will be injected automatically into Laravel Service Providers and extend your filament() method.

### Getting Filament's current request breadcrumbs

[](#getting-filaments-current-request-breadcrumbs)

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

### Getting Filament's current request page title

[](#getting-filaments-current-request-page-title)

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

### Add Filament's breadcrumbs to your topbar

[](#add-filaments-breadcrumbs-to-your-topbar)

[![Filament Breadcrumbs on Topbar](screenshots/filament-breadcrumbs-on-top.png)](screenshots/filament-breadcrumbs-on-top.png)

This is a request I've been getting lately that will have its own plugin really soon. Until then, you can follow the guide below:

1. Create a new view (resources/views/topbar-breadcrumbs.php) and add the following code:

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

```

2. Add the following snippet to your AppServiceProvider.php

```
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'),
    );
}
```

> ⚠️ **Warning:** This is just an example of how to inject breadcrumbs in the topbar. You should be aware that this code isn't responsive and can mess your mobile functionality.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Diogo Pinto](https://github.com/diogogpinto)
- [Adam Weston](https://github.com/awcodes) for the mentorship and all the help
- Special thanks to [Tony Partidge](https://github.com/tonypartridge) and [Fady Mondy](https://github.com/3x1io) for all the help over Filament Discord
- [Geridoc](https://www.geridoc.pt) for giving me the opportunity to share our code to the public
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

↑

FairBetter than 91% of packages

Maintenance76

Regular maintenance activity

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Total

5

Last Release

397d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54b4f8f3cd85d6caa1276d4ef844851e34530fedcd92ec1082ef665ec95d6d9d?d=identicon)[diogogpinto](/maintainers/diogogpinto)

---

Top Contributors

[![diogogpinto](https://avatars.githubusercontent.com/u/74505947?v=4)](https://github.com/diogogpinto "diogogpinto (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![joaopaulolndev](https://avatars.githubusercontent.com/u/11706937?v=4)](https://github.com/joaopaulolndev "joaopaulolndev (1 commits)")

---

Tags

laraveldiogogpintofilament-page-context

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/diogogpinto-filament-page-context/health.svg)

```
[![Health](https://phpackages.com/badges/diogogpinto-filament-page-context/health.svg)](https://phpackages.com/packages/diogogpinto-filament-page-context)
```

###  Alternatives

[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

203110.1k1](/packages/guava-filament-knowledge-base)[vormkracht10/filament-mails

View logged mails and events in a beautiful Filament UI.

15948.0k1](/packages/vormkracht10-filament-mails)[lara-zeus/tartarus

simple multi tenants

112.6k](/packages/lara-zeus-tartarus)[alareqi/filament-pwa

A comprehensive PWA (Progressive Web App) plugin for Filament v3 and v4 admin panels with offline functionality, installation prompts, and icon generation.

112.5k](/packages/alareqi-filament-pwa)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
