PHPackages                             defstudio/env-alert - 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. defstudio/env-alert

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

defstudio/env-alert
===================

Show a nice red alert ribbon when your user is in a production environment

v1.2.2(5mo ago)10357MITPHPPHP ^8.2CI passing

Since Mar 2Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/defstudio/env-alert)[ Packagist](https://packagist.org/packages/defstudio/env-alert)[ Docs](https://github.com/defstudio/env-alert)[ RSS](/packages/defstudio-env-alert/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (16)Versions (17)Used By (0)

Environment Alert
=================

[](#environment-alert)

[ ![Latest Version on Packagist](https://camo.githubusercontent.com/5f45970dce262ffe2fbdc190ed64da58a51e2a98f9b12e975411a784c7568a48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656673747564696f2f656e762d616c6572742e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/defstudio/env-alert)[ ![Tests](https://camo.githubusercontent.com/fb7b8420cef4bd8e36d667182d313e711beb825dd61ee3652de5a29012037934/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656673747564696f2f656e762d616c6572742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d74657374732663616368655365636f6e64733d33363030266c6f676f3d646174613a696d6167652f706e673b6261736536342c6956424f5277304b47676f414141414e5355684555674141414277414141416343414d414141424630792b6d414141426956424d564555414141442f69507639795033586d2b6a2f6d502f2f7766566a36374a653662502f682f70567836703631373564353757517963662b69506e2f695072736e657a417264332b742f7170764e4a64364c502f6a5070753672762f6c50722f6b5070633537542f7276746335374e7036726a336f506c3337634c2f74666e2f77763964366272582f2f4c2f672f72596e2b6e2f677672576d2b6469364c582b6a5072736b6647577a4d707436626c6e3462646435374a6b364c575379636a2b76507175774e566f36726465366250376e7676596e75703931622f2b7666762f6c76746335374f71764e544673392f2f742f746435374c39742f722f69507064364c506170656a2f6f76703236627879363776396c666c64364c4a72344c6a777376622f7876332f6a7633397a76317436627547356354447265483569766c6335724a7936373656346378623537442f792f6835304d4f79344f4355786356613737582f69507065364c502f6a502b7075394c38742f2f2f7476755179636641724e7870364c7a41726431353172372f692f396e3462622f6a2f39653672542f69667237696672736b764c596e7568693837746738626c673762662f76762f2f6c502b77784e746a3962332f71762f2f6f502f2b69767a2f6c2f7238696672796e2f66766c505466705044656f66444b74756a48744f5758314e462f3473654333635238327346753763426f354c694d77504d724141414157485253546c4d412f577638464149432f644d452f576a2b337445472f507637393847316f48526a53306b314c4273574467734a2f7633362b66547938657a6e342b4c683239584e7a4d7a4c79734c41774c53777236366f704a71616b592b4e69344a37656e643062476c7059313158553034384b69636d49523866697a6c2b767741414156644a524546554b4d39747a325658416c4551674f4642425552706b453637753775374531594659516c31536276726c7a7444694c7673732b66632f6643656d584d76414568684b71553735395031724c6f7855445579456839665048307a37414c69567245592b53534e74784e533275706f75597637684f4c313931614b56735a48555467626e51505167446b7134637448646f516d54576d573457467a6c56554456704e4b58663266577057625a497755712f68636d6a5747596e536131705a5a6a456f6f6d72456456416973443743583647456234307271544f4478436a32314f6a444f766a5256386c326a68756442446368672f46556244495a4349547a775179483661392b32414d44626d3947666c74466e786741647451575567514a6c345651713337755063536e7366595a7a61763645773138665134665559504d37516e34755369496479783573614a36542b2f332b354b536c7473686963774932557066414b452f616f415254766e6e374b4d594d646c41557957525379484e324a65553432486c43693454737a5448636d756a33694d566450354a7a6f7941574e7a693654335a47724d46436c694b334241715253432f42322b3649787659594e634f2b324e7066762b79466931304c66425541414141415355564f524b35435949493d)](https://github.com/defstudio/env-alert/actions?query=workflow%3Arun-tests+branch%3Amain)[ ![Code Style](https://camo.githubusercontent.com/c1563b2e5f82e06d7c8d325a30fcbb4f2f3e022122bdd2df684577541a73044d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656673747564696f2f656e762d616c6572742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c652663616368655365636f6e64733d33363030)](https://github.com/defstudio/env-alert/actions?query=workflow%3Alint+branch%3Amain)[ ![Static Analysis](https://camo.githubusercontent.com/995ba42769a30b9e83be84bf03989acbd7d187f48b66944cdd317af41863a6d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656673747564696f2f656e762d616c6572742f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e2663616368655365636f6e64733d33363030)](https://github.com/defstudio/env-alert/actions?query=workflow%3Aphpstan+branch%3Amain)[ ![Total Downloads](https://camo.githubusercontent.com/d0276c765e354b81541426646da06f5a08f409b332c0c8a1eea48f243d562043/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656673747564696f2f656e762d616c6572742e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/defstudio/env-alert)[ ![License](https://camo.githubusercontent.com/9691b7a46c1cd1c070317fddd95da16f9e8515916b6ea714a8bf69555f335ced/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64656673747564696f2f656e762d616c6572743f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/defstudio/env-alert)Show a nice red alert ribbon when **you** (and only you) are in a production environment

[![image](https://user-images.githubusercontent.com/8792274/222460043-dc3e3297-2c59-4d78-9092-feb01efa22bf.png)](https://user-images.githubusercontent.com/8792274/222460043-dc3e3297-2c59-4d78-9092-feb01efa22bf.png)

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

[](#installation)

You can install the package via composer:

```
composer require defstudio/env-alert
```

You should publish the config file with:

```
php artisan vendor:publish --tag="env-alert-config"
```

This is the contents of the published config file:

```
return [
        'enabled' => (bool) env('ENV_ALERT_ENABLED', true),

    /*
     * Current environment, taken from APP_ENV or ENV_ALERT_ENV .env entries
     */
    'current_environment' => env('ENV_ALERT_ENV', env('APP_ENV', 'production')),

    /*
     * Environments where to show the ribbon alert
     */
    'environments' => [
        'production' => [
            /*
             * When to display the ribbon alert.
             */
            'filters' => [
                'email' => [
                    // 'your.email@email.test',
                    // '*@your.company.com'
                ],
                'ip' => [
                    // '123.456.789.101'
                ],
            ],

            /*
             * The ribbon style
             */
            'style' => [
                'position' => 'right',
                'background_color' => '#f30b0b',
                'text_color' => '#ffffff',
            ],
        ],
    ],

    'service_class' => \DefStudio\EnvAlert\AlertService::class,
];
```

That's all, a red ribbon on the top right corner of the screen will warn when you are operating in a production environment!

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. [Follow Us](https://twitter.com/FabioIvona) on Twitter for more updates about this package.

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)

- [Fabio Ivona](https://github.com/defstudio)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance79

Regular maintenance activity

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~105 days

Recently: every ~261 days

Total

11

Last Release

169d ago

Major Versions

v0.0.0 → v1.0.02023-03-02

PHP version history (2 changes)v0.0.0PHP ^8.1

v1.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/db5e0ab5568062368a52c61d67381c1a35be5e5c816968dd3883bc7ba2d46b53?d=identicon)[fabio.ivona](/maintainers/fabio.ivona)

---

Top Contributors

[![fabio-ivona](https://avatars.githubusercontent.com/u/8792274?v=4)](https://github.com/fabio-ivona "fabio-ivona (52 commits)")[![MarioGattolla](https://avatars.githubusercontent.com/u/94918437?v=4)](https://github.com/MarioGattolla "MarioGattolla (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")

---

Tags

laraveldefstudioenv-alert

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/defstudio-env-alert/health.svg)

```
[![Health](https://phpackages.com/badges/defstudio-env-alert/health.svg)](https://phpackages.com/packages/defstudio-env-alert)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)

PHPackages © 2026

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