defstudio / production-ribbon
Show a nice red alert ribbon when your user is in a production environment
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- illuminate/support: ^v10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- rector/rector: ^0.15.19
- spatie/laravel-ray: ^1.26
- spatie/pest-plugin-snapshots: ^2.0
This package is auto-updated.
Last update: 2023-03-06 09:47:08 UTC
README
Show a nice red alert ribbon when you (and only you) are in a production environment
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\RibbonService::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
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently. Follow Us on Twitter for more updates about this package.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.