https://github.com/esign/laravel-environment-badge
https://github.com/esign/laravel-environment-badge
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/esign/laravel-environment-badge
- Owner: esign
- License: mit
- Created: 2023-01-05T15:01:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-11-20T21:40:22.000Z (7 months ago)
- Last Synced: 2025-11-28T04:53:09.683Z (7 months ago)
- Language: PHP
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Display a warning badge for certain app environments
[](https://packagist.org/packages/esign/laravel-environment-badge)
[](https://packagist.org/packages/esign/laravel-environment-badge)

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:
```bash
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:
```bash
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:
```blade
```
To enable this badge for certain environments you may set the `ENVIRONMENT_BADGE_ENABLED` environment variable to true:
```env
ENVIRONMENT_BADGE_ENABLED=true
```
### Testing
```bash
composer test
```
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.