PHPackages                             pxlrbt/filament-environment-indicator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pxlrbt/filament-environment-indicator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pxlrbt/filament-environment-indicator
=====================================

Indicator for the current environment inside Filament

v3.5.1(3mo ago)1521.2M↓28.3%24[1 issues](https://github.com/pxlrbt/filament-environment-indicator/issues)11MITPHPPHP ^8.0CI passing

Since Jul 14Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/pxlrbt/filament-environment-indicator)[ Packagist](https://packagist.org/packages/pxlrbt/filament-environment-indicator)[ GitHub Sponsors](https://github.com/pxlrbt)[ RSS](/packages/pxlrbt-filament-environment-indicator/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (29)Used By (11)

[![header](./.github/resources/pxlrbt-environment-indicator.png)](./.github/resources/pxlrbt-environment-indicator.png)

Filament Environment Indicator
==============================

[](#filament-environment-indicator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/55578606e500153602b7a2f6876b3040854336fc664d49a3f5d9135b7a73a20e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70786c7262742f66696c616d656e742d656e7669726f6e6d656e742d696e64696361746f722e7376673f696e636c7564655f70726572656c6561736573)](https://packagist.org/packages/pxlrbt/filament-environment-indicator)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![GitHub Workflow Status](https://camo.githubusercontent.com/d358d00b5ca44f03f058d17f7a275e076be223f1dfed18ef05738cc9413eb4ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70786c7262742f66696c616d656e742d656e7669726f6e6d656e742d696e64696361746f722f636f64652d7374796c652e796d6c3f6272616e63683d6d61696e266c6162656c3d436f64652532307374796c65267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/d358d00b5ca44f03f058d17f7a275e076be223f1dfed18ef05738cc9413eb4ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70786c7262742f66696c616d656e742d656e7669726f6e6d656e742d696e64696361746f722f636f64652d7374796c652e796d6c3f6272616e63683d6d61696e266c6162656c3d436f64652532307374796c65267374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/03de67e559fb6133cccd53bdb91e31915cbd08607d9974007a968b0a1cd2abac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70786c7262742f66696c616d656e742d656e7669726f6e6d656e742d696e64696361746f722e737667)](https://packagist.org/packages/pxlrbt/filament-environment-indicator)

Never confuse your tabs with different Filament environments again.

[![Screenshot](./.github/resources/preview.gif)](./.github/resources/preview.gif)

Installation via Composer
-------------------------

[](#installation-via-composer)

Plugin VersionFilament VersionPHP Version1.x^2.9.15&gt; 8.02.x3.x&gt; 8.13.x4.x, 5.x&gt; 8.1```
composer require pxlrbt/filament-environment-indicator
```

Usage
-----

[](#usage)

To use this plugin register it in your panel configuration:

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;

$panel
    ->plugins([
        EnvironmentIndicatorPlugin::make(),
    ]);
```

Configuration
-------------

[](#configuration)

Out of the box, this plugin adds a colored border to the top of the admin panel and a badge next to the search bar.

You can customize any behaviour via the plugin object.

### Customizing the view

[](#customizing-the-view)

Use `php artisan vendor:publish --tag="filament-environment-indicator-views"` to publish the view to the `resources/views/vendor/filament-environment-indicator` folder. After this you can customize it as you wish!

### Visibility

[](#visibility)

By default, the package checks whether you have Spatie permissions plugin installed and checks for a role called `super_admin`. You can further customize whether the indicators should be shown.

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->visible(fn () => auth()->user()?->can('see_indicator'))
]);
```

### Environment

[](#environment)

By default, the environment is resolved from `app()->environment()` (i.e. the `APP_ENV` value). You can override it with a static string or a closure:

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->environment(fn () => config('app.custom_env', app()->environment()))
]);
```

This affects the badge label, as well as the default color, badge visibility, and border visibility which all key off the environment value.

### Colors

[](#colors)

You can overwrite the default colors if you want your own colors or need to add more. The `->color()`method accepts any Filament's Color object or a closure that returns a color object.

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
use Filament\Support\Colors\Color;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->color(fn () => match (app()->environment()) {
            'production' => null,
            'staging' => Color::Orange,
            default => Color::Blue,
        })
]);
```

### Indicators

[](#indicators)

By default, both indicators are displayed on non-production environments. You can turn them off separately.

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
use Filament\Support\Colors\Color;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->showBadge(false)
        ->showBorder(true)
]);
```

### Badge position

[](#badge-position)

By default, badge position is `\Filament\View\PanelsRenderHook::GLOBAL_SEARCH_BEFORE`.

```
use Filament\View\PanelsRenderHook;
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->badgePosition(PanelsRenderHook::TOPBAR_LOGO_BEFORE)
]);
```

### Git Branch

[](#git-branch)

You can enable the display of the current git branch in the badge via `->showGitBranch()`. This requires the `exec()` function to be enabled in your PHP configuration.

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
use Filament\Support\Colors\Color;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->showGitBranch()
]);
```

### Debug Mode Warning

[](#debug-mode-warning)

You can enable a debug mode warning for every environment or just for production by using `->showDebugModeWarning()`/`->showDebugModeWarningInProduction()`

```
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
use Filament\Support\Colors\Color;

$panel->plugins([
    EnvironmentIndicatorPlugin::make()
        ->showDebugModeWarningInProduction()
]);
```

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

[](#contributing)

If you want to contribute to this packages, you may want to test it in a real Filament project:

- Fork this repository to your GitHub account.
- Create a Filament app locally.
- Clone your fork in your Filament app's root directory.
- In the `/filament-environment-indicator` directory, create a branch for your fix, e.g. `fix/error-message`.

Install the packages in your app's `composer.json`:

```
"require": {
    "pxlrbt/filament-environment-indicator": "dev-fix/error-message as main-dev",
},
"repositories": [
    {
        "type": "path",
        "url": "filament-environment-indicator"
    }
]
```

Now, run `composer update`.

Credits
-------

[](#credits)

- [Dennis Koch](https://github.com/pxlrbt)
- [All Contributors](../../contributors)

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance78

Regular maintenance activity

Popularity58

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 75.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 ~60 days

Recently: every ~28 days

Total

23

Last Release

117d ago

Major Versions

v0.2.0 → v1.0.02022-10-04

v0.3.0 → v2.0.02023-08-03

v2.1.0 → v3.0.02025-06-13

v2.2.0 → v3.1.12025-07-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/de2f0e928f16fab39bac058ab23744ed045a432404d1275a5a5258acbd368798?d=identicon)[pxlrbt](/maintainers/pxlrbt)

---

Top Contributors

[![pxlrbt](https://avatars.githubusercontent.com/u/22632550?v=4)](https://github.com/pxlrbt "pxlrbt (71 commits)")[![achyutkneupane](https://avatars.githubusercontent.com/u/30431426?v=4)](https://github.com/achyutkneupane "achyutkneupane (6 commits)")[![tonypartridge](https://avatars.githubusercontent.com/u/1400982?v=4)](https://github.com/tonypartridge "tonypartridge (4 commits)")[![mathieutu](https://avatars.githubusercontent.com/u/11351322?v=4)](https://github.com/mathieutu "mathieutu (2 commits)")[![hlipnick](https://avatars.githubusercontent.com/u/5473499?v=4)](https://github.com/hlipnick "hlipnick (2 commits)")[![arcdigital](https://avatars.githubusercontent.com/u/551002?v=4)](https://github.com/arcdigital "arcdigital (1 commits)")[![sakanjo](https://avatars.githubusercontent.com/u/121197517?v=4)](https://github.com/sakanjo "sakanjo (1 commits)")[![slizhva](https://avatars.githubusercontent.com/u/29979800?v=4)](https://github.com/slizhva "slizhva (1 commits)")[![ukeloop](https://avatars.githubusercontent.com/u/45733259?v=4)](https://github.com/ukeloop "ukeloop (1 commits)")[![vlados](https://avatars.githubusercontent.com/u/46914?v=4)](https://github.com/vlados "vlados (1 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (1 commits)")[![webard](https://avatars.githubusercontent.com/u/855788?v=4)](https://github.com/webard "webard (1 commits)")[![DanielvdSpoel](https://avatars.githubusercontent.com/u/28593493?v=4)](https://github.com/DanielvdSpoel "DanielvdSpoel (1 commits)")[![martin-ro](https://avatars.githubusercontent.com/u/10107779?v=4)](https://github.com/martin-ro "martin-ro (1 commits)")

---

Tags

environmentfilamentadminfilamentphpfilamentlaravel-filamentenvironment indicator

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/pxlrbt-filament-environment-indicator/health.svg)

```
[![Health](https://phpackages.com/badges/pxlrbt-filament-environment-indicator/health.svg)](https://phpackages.com/packages/pxlrbt-filament-environment-indicator)
```

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M25](/packages/ysfkaya-filament-phone-input)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

128192.3k3](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57307.1k3](/packages/creagia-filament-code-field)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12453.6k](/packages/jibaymcs-filament-tour)[aymanalhattami/filament-context-menu

context menu (right click menu) for filament

10039.7k](/packages/aymanalhattami-filament-context-menu)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

34226.4k13](/packages/schmeits-filament-character-counter)

PHPackages © 2026

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