esign / laravel-environment-badge
Display a warning badge for certain app environments
Installs: 2 313
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- illuminate/view: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.0|^10.0
README
Display a badge for testing or staging environments. This package is Esign-branded, feel free to fork and change it to fit your own needs.
Installation
You can install the package via composer:
composer require esign/laravel-environment-badge
The package will automatically register a service provider.
Next up, you can optionally publish the configuration and language files:
php artisan vendor:publish --provider="Esign\EnvironmentBadge\EnvironmentBadgeServiceProvider" --tag="config" php artisan vendor:publish --provider="Esign\EnvironmentBadge\EnvironmentBadgeServiceProvider" --tag="lang"
Usage
To display the environment badge you may use the view component that ships with this package:
<x-environment-badge />
To enable this badge for certain environments you may set the ENVIRONMENT_BADGE_ENABLED
environment variable to true:
ENVIRONMENT_BADGE_ENABLED=true
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.