https://github.com/defstudio/env-alert
Show a nice red alert ribbon when your user is in a production environment
https://github.com/defstudio/env-alert
Last synced: 10 months ago
JSON representation
Show a nice red alert ribbon when your user is in a production environment
- Host: GitHub
- URL: https://github.com/defstudio/env-alert
- Owner: defstudio
- License: mit
- Created: 2023-03-02T10:35:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-16T10:03:27.000Z (11 months ago)
- Last Synced: 2025-06-17T02:44:07.612Z (11 months ago)
- Language: PHP
- Size: 83 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Environment Alert
Show a nice red alert ribbon when **you** (and only you) are in a production environment

## Installation
You can install the package via composer:
```bash
composer require defstudio/env-alert
```
You should publish the config file with:
```bash
php artisan vendor:publish --tag="env-alert-config"
```
This is the contents of the published config file:
```php
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
```bash
composer test
```
## 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
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Fabio Ivona](https://github.com/defstudio)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.